@Override public byte putIfAbsent(K key, byte value) { int index = insert(key, value); if (index < 0) { // key was absent return defaultValue(); } else { // key is present return values[index]; } }
@Override public byte getByte(Object key) { int index = index(key); if (index >= 0) { // key is present return values[index]; } else { // key is absent return defaultValue(); } }
@Override public byte put(K key, byte value) { int index = insert(key, value); if (index < 0) { // key was absent return defaultValue(); } else { // key is present byte[] vals = values; byte prevValue = vals[index]; vals[index] = value; return prevValue; } }
@Override public byte getByte(Object key) { int index = index(key); if (index >= 0) { // key is present return values[index]; } else { // key is absent return defaultValue(); } }
@Override public byte putIfAbsent(K key, byte value) { int index = insert(key, value); if (index < 0) { // key was absent return defaultValue(); } else { // key is present return values[index]; } }
@Override public byte replace(K key, byte value) { int index = index(key); if (index >= 0) { // key is present byte[] vals = values; byte oldValue = vals[index]; vals[index] = value; return oldValue; } else { // key is absent return defaultValue(); } }
@Override public byte replace(K key, byte value) { int index = index(key); if (index >= 0) { // key is present byte[] vals = values; byte oldValue = vals[index]; vals[index] = value; return oldValue; } else { // key is absent return defaultValue(); } }
@Override public byte put(K key, byte value) { int index = insert(key, value); if (index < 0) { // key was absent return defaultValue(); } else { // key is present byte[] vals = values; byte prevValue = vals[index]; vals[index] = value; return prevValue; } }
@Override public byte computeIfPresent(K key, ObjByteToByteFunction<? super K> remappingFunction) { if (remappingFunction == null) throw new java.lang.NullPointerException(); int index = index(key); if (index >= 0) { // key is present byte[] vals = values; byte newValue = remappingFunction.applyAsByte(key, vals[index]); vals[index] = newValue; return newValue; } else { // key is absent return defaultValue(); } }
@Override public byte computeIfPresent(K key, ObjByteToByteFunction<? super K> remappingFunction) { if (remappingFunction == null) throw new java.lang.NullPointerException(); int index = index(key); if (index >= 0) { // key is present byte[] vals = values; byte newValue = remappingFunction.applyAsByte(key, vals[index]); vals[index] = newValue; return newValue; } else { // key is absent return defaultValue(); } }
byte newValue = remappingFunction.applyAsByte(null, defaultValue()); incrementModCount(); keys[index] = null;
byte newValue = remappingFunction.applyAsByte(null, defaultValue()); incrementModCount(); keys[index] = null;
byte newValue = remappingFunction.applyAsByte(key, defaultValue()); incrementModCount(); keys[index] = key;
byte newValue = remappingFunction.applyAsByte(key, defaultValue()); incrementModCount(); keys[index] = key;