@Override public long putIfAbsent(double key, long value) { long k = Double.doubleToLongBits(key); int index = insert(k, value); if (index < 0) { // key was absent return defaultValue(); } else { // key is present return table[index + 1]; } }
@Override public long get(double key) { long k = Double.doubleToLongBits(key); int index = index(k); if (index >= 0) { // key is present return table[index + 1]; } else { // key is absent return defaultValue(); } }
@Override public long putIfAbsent(double key, long value) { long k = Double.doubleToLongBits(key); int index = insert(k, value); if (index < 0) { // key was absent return defaultValue(); } else { // key is present return table[index + 1]; } }
@Override public long get(double key) { long k = Double.doubleToLongBits(key); int index = index(k); if (index >= 0) { // key is present return table[index + 1]; } else { // key is absent return defaultValue(); } }
@Override public long put(double key, long value) { long k = Double.doubleToLongBits(key); int index = insert(k, value); if (index < 0) { // key was absent return defaultValue(); } else { // key is present long[] tab = table; long prevValue = tab[index + 1]; tab[index + 1] = value; return prevValue; } }
@Override public long put(double key, long value) { long k = Double.doubleToLongBits(key); int index = insert(k, value); if (index < 0) { // key was absent return defaultValue(); } else { // key is present long[] tab = table; long prevValue = tab[index + 1]; tab[index + 1] = value; return prevValue; } }
@Override public long replace(double key, long value) { long k = Double.doubleToLongBits(key); int index = index(k); if (index >= 0) { // key is present long[] tab = table; long oldValue = tab[index + 1]; tab[index + 1] = value; return oldValue; } else { // key is absent return defaultValue(); } }
@Override public long replace(double key, long value) { long k = Double.doubleToLongBits(key); int index = index(k); if (index >= 0) { // key is present long[] tab = table; long oldValue = tab[index + 1]; tab[index + 1] = value; return oldValue; } else { // key is absent return defaultValue(); } }
@Override public long computeIfPresent(double key, DoubleLongToLongFunction remappingFunction) { long k = Double.doubleToLongBits(key); if (remappingFunction == null) throw new java.lang.NullPointerException(); int index = index(k); if (index >= 0) { // key is present long[] tab = table; long newValue = remappingFunction.applyAsLong(Double.longBitsToDouble(k), tab[index + 1]); tab[index + 1] = newValue; return newValue; } else { // key is absent return defaultValue(); } }
@Override public long computeIfPresent(double key, DoubleLongToLongFunction remappingFunction) { long k = Double.doubleToLongBits(key); if (remappingFunction == null) throw new java.lang.NullPointerException(); int index = index(k); if (index >= 0) { // key is present long[] tab = table; long newValue = remappingFunction.applyAsLong(Double.longBitsToDouble(k), tab[index + 1]); tab[index + 1] = newValue; return newValue; } else { // key is absent return defaultValue(); } }
long newValue = remappingFunction.applyAsLong(Double.longBitsToDouble(k), defaultValue()); incrementModCount(); tab[index] = k;
long newValue = remappingFunction.applyAsLong(Double.longBitsToDouble(k), defaultValue()); incrementModCount(); tab[index] = k;