@Override public void justPut(short 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(short 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(short 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(short 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(Short 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(Short 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(Short 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 put(Short 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 putIfAbsent(short 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 putIfAbsent(short 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(short 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 put(short 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; } }