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