@Override public boolean containsEntry(short key, int value) { int index = index(key); if (index >= 0) { // key is present return values[index] == value; } else { // key is absent return false; } }
@Override public boolean containsEntry(short key, int value) { int index = index(key); if (index >= 0) { // key is present return values[index] == value; } else { // key is absent return false; } }
@Override public Float getOrDefault(Object key, Float defaultValue) { int index = index((Short) key); if (index >= 0) { // key is present return Float.intBitsToFloat(values[index]); } else { // key is absent return defaultValue; } }
@Override public boolean containsEntry(short key, float value) { int index = index(key); if (index >= 0) { // key is present return values[index] == Float.floatToIntBits(value); } else { // key is absent return false; } }
@Override public Float get(Object key) { int index = index((Short) key); if (index >= 0) { // key is present return Float.intBitsToFloat(values[index]); } else { // key is absent return null; } }
@Override public boolean containsEntry(short key, float value) { int index = index(key); if (index >= 0) { // key is present return values[index] == Float.floatToIntBits(value); } else { // key is absent return false; } }
@Override public Float get(Object key) { int index = index((Short) key); if (index >= 0) { // key is present return Float.intBitsToFloat(values[index]); } else { // key is absent return null; } }
@Override public float getOrDefault(short key, float defaultValue) { int index = index(key); if (index >= 0) { // key is present return Float.intBitsToFloat(values[index]); } else { // key is absent return defaultValue; } }
@Override public float getOrDefault(short key, float defaultValue) { int index = index(key); if (index >= 0) { // key is present return Float.intBitsToFloat(values[index]); } else { // key is absent return defaultValue; } }
@Override public Float getOrDefault(Object key, Float defaultValue) { int index = index((Short) key); if (index >= 0) { // key is present return Float.intBitsToFloat(values[index]); } else { // key is absent return defaultValue; } }
@Override public Float replace(Short key, Float value) { int index = index(key); if (index >= 0) { // key is present int[] vals = values; float oldValue = Float.intBitsToFloat(vals[index]); vals[index] = Float.floatToIntBits(value); return oldValue; } else { // key is absent return null; } }
@Override public Float replace(Short key, Float value) { int index = index(key); if (index >= 0) { // key is present int[] vals = values; float oldValue = Float.intBitsToFloat(vals[index]); vals[index] = Float.floatToIntBits(value); return oldValue; } else { // key is absent return null; } }
@Override public boolean replace(short key, float oldValue, float newValue) { int index = index(key); if (index >= 0) { // key is present int[] vals = values; if (vals[index] == Float.floatToIntBits(oldValue)) { vals[index] = Float.floatToIntBits(newValue); return true; } else { return false; } } else { // key is absent return false; } }
@Override public boolean replace(short key, float oldValue, float newValue) { int index = index(key); if (index >= 0) { // key is present int[] vals = values; if (vals[index] == Float.floatToIntBits(oldValue)) { vals[index] = Float.floatToIntBits(newValue); return true; } else { return false; } } else { // key is absent return false; } }
@Override public float replace(short key, float value) { int index = index(key); if (index >= 0) { // key is present int[] vals = values; float oldValue = Float.intBitsToFloat(vals[index]); vals[index] = Float.floatToIntBits(value); return oldValue; } else { // key is absent return defaultValue(); } }
@Override public float get(short key) { int index = index(key); if (index >= 0) { // key is present return Float.intBitsToFloat(values[index]); } else { // key is absent return defaultValue(); } }
@Override public float get(short key) { int index = index(key); if (index >= 0) { // key is present return Float.intBitsToFloat(values[index]); } else { // key is absent return defaultValue(); } }
@Override public float replace(short key, float value) { int index = index(key); if (index >= 0) { // key is present int[] vals = values; float oldValue = Float.intBitsToFloat(vals[index]); vals[index] = Float.floatToIntBits(value); return oldValue; } else { // key is absent return defaultValue(); } }
@Override public float computeIfPresent(short key, ShortFloatToFloatFunction remappingFunction) { if (remappingFunction == null) throw new java.lang.NullPointerException(); int index = index(key); if (index >= 0) { // key is present int[] vals = values; float newValue = remappingFunction.applyAsFloat(key, Float.intBitsToFloat(vals[index])); vals[index] = Float.floatToIntBits(newValue); return newValue; } else { // key is absent return defaultValue(); } }
@Override public float computeIfPresent(short key, ShortFloatToFloatFunction remappingFunction) { if (remappingFunction == null) throw new java.lang.NullPointerException(); int index = index(key); if (index >= 0) { // key is present int[] vals = values; float newValue = remappingFunction.applyAsFloat(key, Float.intBitsToFloat(vals[index])); vals[index] = Float.floatToIntBits(newValue); return newValue; } else { // key is absent return defaultValue(); } }