@Override public void justPut(K key, int value) { int index = insert(key, value); if (index < 0) { // key was absent return; } else { // key is present values[index] = value; return; } }
@Override public void justPut(K key, int value) { int index = insert(key, value); if (index < 0) { // key was absent return; } else { // key is present values[index] = value; return; } }
@Override public void justPut(K key, float value) { int index = insert(key, Float.floatToIntBits(value)); if (index < 0) { // key was absent return; } else { // key is present values[index] = Float.floatToIntBits(value); return; } }
@Override public void justPut(K key, float value) { int index = insert(key, Float.floatToIntBits(value)); if (index < 0) { // key was absent return; } else { // key is present values[index] = Float.floatToIntBits(value); return; } }
@Override public Float putIfAbsent(K key, Float value) { int index = insert(key, Float.floatToIntBits(value)); if (index < 0) { // key was absent return null; } else { // key is present return Float.intBitsToFloat(values[index]); } }
@Override public Float putIfAbsent(K key, Float value) { int index = insert(key, Float.floatToIntBits(value)); if (index < 0) { // key was absent return null; } else { // key is present return Float.intBitsToFloat(values[index]); } }
@Override public Float put(K key, Float value) { int index = insert(key, Float.floatToIntBits(value)); if (index < 0) { // key was absent return null; } else { // key is present int[] vals = values; float prevValue = Float.intBitsToFloat(vals[index]); vals[index] = Float.floatToIntBits(value); return prevValue; } }
@Override public float addValue(K key, float addition, float defaultValue) { float value = defaultValue + addition; int index = insert(key, Float.floatToIntBits(value)); if (index < 0) { // key was absent return value; } else { // key is present int[] vals = values; float newValue = Float.intBitsToFloat(vals[index]) + addition; vals[index] = Float.floatToIntBits(newValue); return newValue; } }
@Override public float addValue(K key, float value) { int index = insert(key, Float.floatToIntBits(value)); if (index < 0) { // key was absent return value; } else { // key is present int[] vals = values; float newValue = Float.intBitsToFloat(vals[index]) + value; vals[index] = Float.floatToIntBits(newValue); return newValue; } }
@Override public Float put(K key, Float value) { int index = insert(key, Float.floatToIntBits(value)); if (index < 0) { // key was absent return null; } else { // key is present int[] vals = values; float prevValue = Float.intBitsToFloat(vals[index]); vals[index] = Float.floatToIntBits(value); return prevValue; } }
@Override public float addValue(K key, float value) { int index = insert(key, Float.floatToIntBits(value)); if (index < 0) { // key was absent return value; } else { // key is present int[] vals = values; float newValue = Float.intBitsToFloat(vals[index]) + value; vals[index] = Float.floatToIntBits(newValue); return newValue; } }
@Override public float addValue(K key, float addition, float defaultValue) { float value = defaultValue + addition; int index = insert(key, Float.floatToIntBits(value)); if (index < 0) { // key was absent return value; } else { // key is present int[] vals = values; float newValue = Float.intBitsToFloat(vals[index]) + addition; vals[index] = Float.floatToIntBits(newValue); return newValue; } }
@Override public float putIfAbsent(K key, float value) { int index = insert(key, Float.floatToIntBits(value)); if (index < 0) { // key was absent return defaultValue(); } else { // key is present return Float.intBitsToFloat(values[index]); } }
@Override public float put(K key, float value) { int index = insert(key, Float.floatToIntBits(value)); if (index < 0) { // key was absent return defaultValue(); } else { // key is present int[] vals = values; float prevValue = Float.intBitsToFloat(vals[index]); vals[index] = Float.floatToIntBits(value); return prevValue; } }
@Override public float putIfAbsent(K key, float value) { int index = insert(key, Float.floatToIntBits(value)); if (index < 0) { // key was absent return defaultValue(); } else { // key is present return Float.intBitsToFloat(values[index]); } }
@Override public float put(K key, float value) { int index = insert(key, Float.floatToIntBits(value)); if (index < 0) { // key was absent return defaultValue(); } else { // key is present int[] vals = values; float prevValue = Float.intBitsToFloat(vals[index]); vals[index] = Float.floatToIntBits(value); return prevValue; } }