@Override public boolean remove(final short key, final int value) { synchronized (sync) { return map.remove(key, value); } } @Override
/** * {@inheritDoc} * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override public boolean remove(final Object key, final Object value) { synchronized (sync) { return map.remove(key, value); } } /**
@Override public boolean remove(final Object o) { if (!(o instanceof Map.Entry)) return false; if (o instanceof Short2IntMap.Entry) { final Short2IntMap.Entry e = (Short2IntMap.Entry) o; return map.remove(e.getShortKey(), e.getIntValue()); } Map.Entry<?, ?> e = (Map.Entry<?, ?>) o; final Object key = e.getKey(); if (key == null || !(key instanceof Short)) return false; final short k = ((Short) (key)).shortValue(); final Object value = e.getValue(); if (value == null || !(value instanceof Integer)) return false; final int v = ((Integer) (value)).intValue(); return map.remove(k, v); } @Override
final Integer newValue = remappingFunction.apply(Short.valueOf(key), Integer.valueOf(oldValue)); if (newValue == null) { remove(key); return drv;
if (newValue == null) { if (contained) remove(key); return drv;
final Integer mergedValue = remappingFunction.apply(Integer.valueOf(oldValue), Integer.valueOf(value)); if (mergedValue == null) { remove(key); return drv;
/** * Removes the entry for the specified key only if it is currently mapped to the * specified value. * * @param key * key with which the specified value is associated. * @param value * value expected to be associated with the specified key. * * @return {@code true} if the value was removed. * * @see java.util.Map#remove(Object, Object) * @since 8.0.0 */ default boolean remove(final short key, final int value) { final int curValue = get(key); if (!((curValue) == (value)) || (curValue == defaultReturnValue() && !containsKey(key))) return false; remove(key); return true; } /**