/** {@inheritDoc} */ @Override public V computeIfPresent(final float k, final java.util.function.BiFunction<? super Float, ? super V, ? extends V> remappingFunction) { java.util.Objects.requireNonNull(remappingFunction); final int pos = find(k); if (pos < 0) return defRetValue; final V newValue = remappingFunction.apply(Float.valueOf(k), (value[pos])); if (newValue == null) { if ((Float.floatToIntBits(k) == 0)) removeNullEntry(); else removeEntry(pos); return defRetValue; } return value[pos] = (newValue); } /** {@inheritDoc} */
/** {@inheritDoc} */ @Override public V compute(final float k, final java.util.function.BiFunction<? super Float, ? super V, ? extends V> remappingFunction) { java.util.Objects.requireNonNull(remappingFunction); final int pos = find(k); final V newValue = remappingFunction.apply(Float.valueOf(k), pos >= 0 ? (value[pos]) : null); if (newValue == null) { if (pos >= 0) { if ((Float.floatToIntBits(k) == 0)) removeNullEntry(); else removeEntry(pos); } return defRetValue; } V newVal = (newValue); if (pos < 0) { insert(-pos - 1, k, newVal); return newVal; } return value[pos] = newVal; } /** {@inheritDoc} */
@Override public V remove(final float k) { if ((Float.floatToIntBits(k) == 0)) { if (containsNullKey) return removeNullEntry(); return defRetValue; } float curr; final float[] key = this.key; int pos; // The starting point. if ((Float.floatToIntBits( curr = key[pos = it.unimi.dsi.fastutil.HashCommon.mix(it.unimi.dsi.fastutil.HashCommon.float2int(k)) & mask]) == 0)) return defRetValue; if ((Float.floatToIntBits(k) == Float.floatToIntBits(curr))) return removeEntry(pos); while (true) { if ((Float.floatToIntBits(curr = key[pos = (pos + 1) & mask]) == 0)) return defRetValue; if ((Float.floatToIntBits(k) == Float.floatToIntBits(curr))) return removeEntry(pos); } } @Override
if ((Float.floatToIntBits(k) == 0)) { if (containsNullKey && java.util.Objects.equals(v, value[n])) { removeNullEntry(); return true;
/** {@inheritDoc} */ @Override public V merge(final float k, final V v, final java.util.function.BiFunction<? super V, ? super V, ? extends V> remappingFunction) { java.util.Objects.requireNonNull(remappingFunction); final int pos = find(k); if (pos < 0 || value[pos] == null) { if (v == null) return defRetValue; insert(-pos - 1, k, v); return v; } final V newValue = remappingFunction.apply((value[pos]), (v)); if (newValue == null) { if ((Float.floatToIntBits(k) == 0)) removeNullEntry(); else removeEntry(pos); return defRetValue; } return value[pos] = (newValue); } /*