@Override public V getOrDefault(Object key, V defaultValue) { int index = index((Character) key); if (index >= 0) { // key is present return values[index]; } else { // key is absent return defaultValue; } }
@Override public V get(Object key) { int index = index((Character) key); if (index >= 0) { // key is present return values[index]; } else { // key is absent return null; } }
@Override public V getOrDefault(char key, V defaultValue) { int index = index(key); if (index >= 0) { // key is present return values[index]; } else { // key is absent return defaultValue; } }
@Override public V getOrDefault(char key, V defaultValue) { int index = index(key); if (index >= 0) { // key is present return values[index]; } else { // key is absent return defaultValue; } }
@Override public V get(char key) { int index = index(key); if (index >= 0) { // key is present return values[index]; } else { // key is absent return null; } }
@Override public V getOrDefault(Object key, V defaultValue) { int index = index((Character) key); if (index >= 0) { // key is present return values[index]; } else { // key is absent return defaultValue; } }
@Override public V get(Object key) { int index = index((Character) key); if (index >= 0) { // key is present return values[index]; } else { // key is absent return null; } }
@Override public V get(char key) { int index = index(key); if (index >= 0) { // key is present return values[index]; } else { // key is absent return null; } }
@Override public V replace(char key, V value) { int index = index(key); if (index >= 0) { // key is present V[] vals = values; V oldValue = vals[index]; vals[index] = value; return oldValue; } else { // key is absent return null; } }
@Override public V replace(Character key, V value) { int index = index(key); if (index >= 0) { // key is present V[] vals = values; V oldValue = vals[index]; vals[index] = value; return oldValue; } else { // key is absent return null; } }
@Override public V replace(Character key, V value) { int index = index(key); if (index >= 0) { // key is present V[] vals = values; V oldValue = vals[index]; vals[index] = value; return oldValue; } else { // key is absent return null; } }
@Override public V replace(char key, V value) { int index = index(key); if (index >= 0) { // key is present V[] vals = values; V oldValue = vals[index]; vals[index] = value; return oldValue; } else { // key is absent return null; } }
@Override public boolean containsEntry(char key, Object value) { int index = index(key); if (index >= 0) { // key is present return nullableValueEquals(values[index], (V) value); } else { // key is absent return false; } }
@Override public boolean containsEntry(char key, Object value) { int index = index(key); if (index >= 0) { // key is present return nullableValueEquals(values[index], (V) value); } else { // key is absent return false; } }
@Override public boolean replace(char key, V oldValue, V newValue) { int index = index(key); if (index >= 0) { // key is present V[] vals = values; if (nullableValueEquals(vals[index], (V) oldValue)) { vals[index] = newValue; return true; } else { return false; } } else { // key is absent return false; } }
@Override public boolean replace(char key, V oldValue, V newValue) { int index = index(key); if (index >= 0) { // key is present V[] vals = values; if (nullableValueEquals(vals[index], (V) oldValue)) { vals[index] = newValue; return true; } else { return false; } } else { // key is absent return false; } }
if (remappingFunction == null) throw new java.lang.NullPointerException(); int index = index(k); if (index >= 0) {
@Override public V computeIfPresent(char key, CharObjFunction<? super V, ? extends V> remappingFunction) { if (remappingFunction == null) throw new java.lang.NullPointerException(); int index = index(key); if (index >= 0) { // key is present V[] vals = values; V val; if ((val = vals[index]) != null) { V newValue = remappingFunction.apply(key, val); if (newValue != null) { vals[index] = newValue; return newValue; } else { incrementModCount(); set[index] = removedValue; vals[index] = null; postRemoveHook(); return null; } } else { return null; } } else { // key is absent return null; } }
@Override public V computeIfPresent(char key, CharObjFunction<? super V, ? extends V> remappingFunction) { if (remappingFunction == null) throw new java.lang.NullPointerException(); int index = index(key); if (index >= 0) { // key is present V[] vals = values; V val; if ((val = vals[index]) != null) { V newValue = remappingFunction.apply(key, val); if (newValue != null) { vals[index] = newValue; return newValue; } else { incrementModCount(); set[index] = removedValue; vals[index] = null; postRemoveHook(); return null; } } else { return null; } } else { // key is absent return null; } }
public V computeIfPresent(Character key, BiFunction<? super Character, ? super V, ? extends V> remappingFunction) { char k = key; if (remappingFunction == null) throw new java.lang.NullPointerException(); int index = index(k); if (index >= 0) { // key is present V[] vals = values; V val; if ((val = vals[index]) != null) { V newValue = remappingFunction.apply(k, val); if (newValue != null) { vals[index] = newValue; return newValue; } else { incrementModCount(); set[index] = removedValue; vals[index] = null; postRemoveHook(); return null; } } else { return null; } } else { // key is absent return null; } }