@Override public void clear() { UpdatableLHashSeparateKVShortDoubleMapGO.this.clear(); } }
@Override @SuppressWarnings("unchecked") public boolean contains(Object o) { try { Map.Entry<Short, Double> e = (Map.Entry<Short, Double>) o; return containsEntry(e.getKey(), e.getValue()); } catch (NullPointerException e) { return false; } catch (ClassCastException e) { return false; } }
@Override public boolean contains(Object o) { return UpdatableLHashSeparateKVShortDoubleMapGO.this.containsValue(o); }
@Override public double get(short key) { int index = index(key); if (index >= 0) { // key is present return Double.longBitsToDouble(values[index]); } else { // key is absent return defaultValue(); } }
@Override public double putIfAbsent(short key, double value) { int index = insert(key, Double.doubleToLongBits(value)); if (index < 0) { // key was absent return defaultValue(); } else { // key is present return Double.longBitsToDouble(values[index]); } }
short free; if (k == (free = freeValue)) { free = changeFree(); incrementModCount(); keys[index] = k; vals[index] = Double.doubleToLongBits(value); postInsertHook(); return value; } else {
short free; if (key == (free = freeValue)) { free = changeFree(); double newValue = remappingFunction.applyAsDouble(key, defaultValue()); incrementModCount(); keys[index] = key; vals[index] = Double.doubleToLongBits(newValue); postInsertHook(); return newValue;
@Override @Nonnull public UpdatableLHashSeparateKVShortDoubleMapGO newUpdatableMap( Map<Short, Double> map) { if (map instanceof ShortDoubleMap) { if (map instanceof SeparateKVShortDoubleLHash) { SeparateKVShortDoubleLHash hash = (SeparateKVShortDoubleLHash) map; if (hash.hashConfig().equals(hashConf)) { UpdatableLHashSeparateKVShortDoubleMapGO res = uninitializedUpdatableMap(); res.copy(hash); return res; } } UpdatableLHashSeparateKVShortDoubleMapGO res = newUpdatableMap(map.size()); res.putAll(map); return res; } UpdatableLHashSeparateKVShortDoubleMapGO res = newUpdatableMap(map.size()); for (Map.Entry<Short, Double> entry : map.entrySet()) { res.put(entry.getKey(), entry.getValue()); } return res; } }
@Nonnull @Override public HashConfig hashConfig() { return UpdatableLHashSeparateKVShortDoubleMapGO.this.hashConfig(); }
@Override public double currentLoad() { return UpdatableLHashSeparateKVShortDoubleMapGO.this.currentLoad(); }
public int hashCode() { return UpdatableLHashSeparateKVShortDoubleMapGO.this.hashCode(); }
short free; if (key == (free = freeValue)) { free = changeFree(); incrementModCount(); keys[index] = key; vals[index] = Double.doubleToLongBits(value); postInsertHook(); return value;
short free; if (key == (free = freeValue)) { free = changeFree(); double newValue = remappingFunction.applyAsDouble(key, defaultValue()); incrementModCount(); keys[index] = key; vals[index] = Double.doubleToLongBits(newValue); postInsertHook(); return newValue;
@Override public double get(short key) { int index = index(key); if (index >= 0) { // key is present return Double.longBitsToDouble(values[index]); } else { // key is absent return defaultValue(); } }
@Override @Nonnull public UpdatableLHashSeparateKVShortDoubleMapGO newUpdatableMap( Map<Short, Double> map) { if (map instanceof ShortDoubleMap) { if (map instanceof SeparateKVShortDoubleLHash) { SeparateKVShortDoubleLHash hash = (SeparateKVShortDoubleLHash) map; if (hash.hashConfig().equals(hashConf)) { UpdatableLHashSeparateKVShortDoubleMapGO res = uninitializedUpdatableMap(); res.copy(hash); return res; } } UpdatableLHashSeparateKVShortDoubleMapGO res = newUpdatableMap(map.size()); res.putAll(map); return res; } UpdatableLHashSeparateKVShortDoubleMapGO res = newUpdatableMap(map.size()); for (Map.Entry<Short, Double> entry : map.entrySet()) { res.put(entry.getKey(), entry.getValue()); } return res; } }
@Override public double putIfAbsent(short key, double value) { int index = insert(key, Double.doubleToLongBits(value)); if (index < 0) { // key was absent return defaultValue(); } else { // key is present return Double.longBitsToDouble(values[index]); } }
@Nonnull @Override public HashConfig hashConfig() { return UpdatableLHashSeparateKVShortDoubleMapGO.this.hashConfig(); }
@Override public double currentLoad() { return UpdatableLHashSeparateKVShortDoubleMapGO.this.currentLoad(); }
public int hashCode() { return UpdatableLHashSeparateKVShortDoubleMapGO.this.hashCode(); }
short free; if (k == (free = freeValue)) { free = changeFree(); incrementModCount(); keys[index] = k; vals[index] = Double.doubleToLongBits(newValue); postInsertHook(); return newValue; } else {