@Override public Byte putIfAbsent(Short key, Byte value) { int index = insert(key, value); if (index < 0) { // key was absent return null; } else { // key is present return values[index]; } }
@Override public void justPut(short key, byte value) { int index = insert(key, value); if (index < 0) { // key was absent return; } else { // key is present values[index] = value; return; } }
@Override public byte addValue(short key, byte value) { int index = insert(key, value); if (index < 0) { // key was absent return value; } else { // key is present byte[] vals = values; byte newValue = (byte) (vals[index] + value); vals[index] = newValue; return newValue; } }
@Override public byte addValue(short key, byte addition, byte defaultValue) { byte value = (byte) (defaultValue + addition); int index = insert(key, value); if (index < 0) { // key was absent return value; } else { // key is present byte[] vals = values; byte newValue = (byte) (vals[index] + addition); vals[index] = newValue; return newValue; } }
@Override public Byte putIfAbsent(Short key, Byte value) { int index = insert(key, value); if (index < 0) { // key was absent return null; } else { // key is present return values[index]; } }
@Override public void justPut(short key, byte value) { int index = insert(key, value); if (index < 0) { // key was absent return; } else { // key is present values[index] = value; return; } }
@Override public Byte put(Short key, Byte value) { int index = insert(key, value); if (index < 0) { // key was absent return null; } else { // key is present byte[] vals = values; byte prevValue = vals[index]; vals[index] = value; return prevValue; } }
@Override public Byte put(Short key, Byte value) { int index = insert(key, value); if (index < 0) { // key was absent return null; } else { // key is present byte[] vals = values; byte prevValue = vals[index]; vals[index] = value; return prevValue; } }
@Override public byte addValue(short key, byte value) { int index = insert(key, value); if (index < 0) { // key was absent return value; } else { // key is present byte[] vals = values; byte newValue = (byte) (vals[index] + value); vals[index] = newValue; return newValue; } }
@Override public byte addValue(short key, byte addition, byte defaultValue) { byte value = (byte) (defaultValue + addition); int index = insert(key, value); if (index < 0) { // key was absent return value; } else { // key is present byte[] vals = values; byte newValue = (byte) (vals[index] + addition); vals[index] = newValue; return newValue; } }
@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 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 public byte put(short 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 put(short 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; } }