@Override public boolean containsEntry(long key, long value) { int index = index(key); if (index >= 0) { // key is present return table[index + 1] == value; } else { // key is absent return false; } }
@Override public boolean containsEntry(long key, long value) { int index = index(key); if (index >= 0) { // key is present return table[index + 1] == value; } else { // key is absent return false; } }
@Override public Long get(Object key) { long k = Double.doubleToLongBits((Double) key); int index = index(k); if (index >= 0) { // key is present return table[index + 1]; } else { // key is absent return null; } }
@Override public long getOrDefault(double key, long defaultValue) { 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 boolean containsEntry(double key, long value) { long k = Double.doubleToLongBits(key); int index = index(k); if (index >= 0) { // key is present return table[index + 1] == value; } else { // key is absent return false; } }
@Override public Long get(Object key) { long k = Double.doubleToLongBits((Double) key); int index = index(k); if (index >= 0) { // key is present return table[index + 1]; } else { // key is absent return null; } }
@Override public boolean containsEntry(double key, long value) { long k = Double.doubleToLongBits(key); int index = index(k); if (index >= 0) { // key is present return table[index + 1] == value; } else { // key is absent return false; } }
@Override public Long getOrDefault(Object key, Long defaultValue) { long k = Double.doubleToLongBits((Double) key); int index = index(k); if (index >= 0) { // key is present return table[index + 1]; } else { // key is absent return defaultValue; } }
@Override public Long getOrDefault(Object key, Long defaultValue) { long k = Double.doubleToLongBits((Double) key); int index = index(k); if (index >= 0) { // key is present return table[index + 1]; } else { // key is absent return defaultValue; } }
@Override public long getOrDefault(double key, long defaultValue) { 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 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 null; } }
@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 null; } }
@Override public boolean replace(double key, long oldValue, long newValue) { long k = Double.doubleToLongBits(key); int index = index(k); if (index >= 0) { // key is present long[] tab = table; if (tab[index + 1] == oldValue) { tab[index + 1] = newValue; return true; } else { return false; } } else { // key is absent return false; } }
@Override public boolean replace(double key, long oldValue, long newValue) { long k = Double.doubleToLongBits(key); int index = index(k); if (index >= 0) { // key is present long[] tab = table; if (tab[index + 1] == oldValue) { tab[index + 1] = newValue; return true; } else { return false; } } else { // key is absent return false; } }
@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 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 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(); } }