@Override public void clear() { UpdatableQHashParallelKVDoubleLongMapGO.this.clear(); } }
@Override @SuppressWarnings("unchecked") public boolean contains(Object o) { try { Map.Entry<Double, Long> e = (Map.Entry<Double, Long>) o; return containsEntry(e.getKey(), e.getValue()); } catch (NullPointerException e) { return false; } catch (ClassCastException e) { return false; } }
@Override public boolean contains(long v) { return UpdatableQHashParallelKVDoubleLongMapGO.this.containsValue(v); }
@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]; } }
incrementModCount(); tab[index] = k; tab[index + 1] = value; postInsertHook(); return value; } else {
@Override @Nonnull public UpdatableQHashParallelKVDoubleLongMapGO newUpdatableMap( Map<Double, Long> map) { if (map instanceof DoubleLongMap) { if (map instanceof ParallelKVDoubleLongQHash) { ParallelKVDoubleLongQHash hash = (ParallelKVDoubleLongQHash) map; if (hash.hashConfig().equals(hashConf)) { UpdatableQHashParallelKVDoubleLongMapGO res = uninitializedUpdatableMap(); res.copy(hash); return res; } } UpdatableQHashParallelKVDoubleLongMapGO res = newUpdatableMap(map.size()); res.putAll(map); return res; } UpdatableQHashParallelKVDoubleLongMapGO res = newUpdatableMap(map.size()); for (Map.Entry<Double, Long> entry : map.entrySet()) { res.put(entry.getKey(), entry.getValue()); } return res; } }
long newValue = remappingFunction.applyAsLong(Double.longBitsToDouble(k), defaultValue()); incrementModCount(); tab[index] = k; tab[index + 1] = newValue; postInsertHook(); return newValue;
@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; } }
@Nonnull @Override public HashConfig hashConfig() { return UpdatableQHashParallelKVDoubleLongMapGO.this.hashConfig(); }
@Override public double currentLoad() { return UpdatableQHashParallelKVDoubleLongMapGO.this.currentLoad(); }
public int hashCode() { return UpdatableQHashParallelKVDoubleLongMapGO.this.hashCode(); }
incrementModCount(); tab[index] = k; tab[index + 1] = value; postInsertHook(); return value;
@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 @Nonnull public UpdatableQHashParallelKVDoubleLongMapGO newUpdatableMap( Map<Double, Long> map) { if (map instanceof DoubleLongMap) { if (map instanceof ParallelKVDoubleLongQHash) { ParallelKVDoubleLongQHash hash = (ParallelKVDoubleLongQHash) map; if (hash.hashConfig().equals(hashConf)) { UpdatableQHashParallelKVDoubleLongMapGO res = uninitializedUpdatableMap(); res.copy(hash); return res; } } UpdatableQHashParallelKVDoubleLongMapGO res = newUpdatableMap(map.size()); res.putAll(map); return res; } UpdatableQHashParallelKVDoubleLongMapGO res = newUpdatableMap(map.size()); for (Map.Entry<Double, Long> entry : map.entrySet()) { res.put(entry.getKey(), entry.getValue()); } return res; } }
long newValue = remappingFunction.applyAsLong(Double.longBitsToDouble(k), defaultValue()); incrementModCount(); tab[index] = k; tab[index + 1] = newValue; postInsertHook(); return newValue;
@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 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]; } }
@Nonnull @Override public HashConfig hashConfig() { return UpdatableQHashParallelKVDoubleLongMapGO.this.hashConfig(); }
@Override public double currentLoad() { return UpdatableQHashParallelKVDoubleLongMapGO.this.currentLoad(); }