/** {@inheritDoc} */ @Override public short computeShortIfPresent(final K k, final java.util.function.BiFunction<? super K, ? super Short, ? extends Short> remappingFunction) { java.util.Objects.requireNonNull(remappingFunction); final int pos = find(k); if (pos < 0) return defRetValue; final Short newValue = remappingFunction.apply((k), Short.valueOf(value[pos])); if (newValue == null) { if (((k) == null)) removeNullEntry(); else removeEntry(pos); return defRetValue; } return value[pos] = (newValue).shortValue(); } /** {@inheritDoc} */
/** {@inheritDoc} */ @Override public short mergeShort(final K k, final short v, final java.util.function.BiFunction<? super Short, ? super Short, ? extends Short> remappingFunction) { java.util.Objects.requireNonNull(remappingFunction); final int pos = find(k); if (pos < 0) { insert(-pos - 1, k, v); return v; } final Short newValue = remappingFunction.apply(Short.valueOf(value[pos]), Short.valueOf(v)); if (newValue == null) { if (((k) == null)) removeNullEntry(); else removeEntry(pos); return defRetValue; } return value[pos] = (newValue).shortValue(); } /*
/** {@inheritDoc} */ @Override public short computeShort(final K k, final java.util.function.BiFunction<? super K, ? super Short, ? extends Short> remappingFunction) { java.util.Objects.requireNonNull(remappingFunction); final int pos = find(k); final Short newValue = remappingFunction.apply((k), pos >= 0 ? Short.valueOf(value[pos]) : null); if (newValue == null) { if (pos >= 0) { if (((k) == null)) removeNullEntry(); else removeEntry(pos); } return defRetValue; } short newVal = (newValue).shortValue(); if (pos < 0) { insert(-pos - 1, k, newVal); return newVal; } return value[pos] = newVal; } /** {@inheritDoc} */
@Override @SuppressWarnings("unchecked") public short removeShort(final Object k) { if ((((K) k) == null)) { if (containsNullKey) return removeNullEntry(); return defRetValue; } K curr; final K[] key = this.key; int pos; // The starting point. if (((curr = key[pos = (it.unimi.dsi.fastutil.HashCommon.mix((k).hashCode())) & mask]) == null)) return defRetValue; if (((k).equals(curr))) return removeEntry(pos); while (true) { if (((curr = key[pos = (pos + 1) & mask]) == null)) return defRetValue; if (((k).equals(curr))) return removeEntry(pos); } } @Override
if ((((K) k) == null)) { if (containsNullKey && ((v) == (value[n]))) { removeNullEntry(); return true;