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