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