@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 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 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 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 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 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 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 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(); } }
if (cur == free) { return defaultValue(); } else { int bIndex = index, fIndex = index, step = 1; } else if (cur == free) { return defaultValue(); } else if (cur == free) { return defaultValue(); } else { return defaultValue();
if (cur == free) { return defaultValue(); } else { int bIndex = index, fIndex = index, step = 1; } else if (cur == free) { return defaultValue(); } else if (cur == free) { return defaultValue(); } else { return defaultValue();
float newValue = defaultValue() + value; incrementModCount(); keys[firstRemoved] = key; float newValue = defaultValue() + value; incrementModCount(); keys[index] = key;
float newValue = defaultValue() + value; incrementModCount(); keys[firstRemoved] = key; float newValue = defaultValue() + value; incrementModCount(); keys[index] = key;
float newValue = remappingFunction.applyAsFloat(key, defaultValue()); incrementModCount(); keys[firstRemoved] = key; float newValue = remappingFunction.applyAsFloat(key, defaultValue()); incrementModCount(); keys[index] = key;
float newValue = remappingFunction.applyAsFloat(key, defaultValue()); incrementModCount(); keys[firstRemoved] = key; float newValue = remappingFunction.applyAsFloat(key, defaultValue()); incrementModCount(); keys[index] = key;