/** * retrieves the value for <tt>key</tt> * * @param key an <code>long</code> value * @return the value of <tt>key</tt> or (long)0 if no such mapping exists. */ public V get(long key) { int index = index(key); return index < 0 ? null : _values[index]; }
/** * Deletes a key/value pair from the map. * * @param key an <code>long</code> value * @return an <code>Object</code> value or (long)0 if no such mapping exists. */ public V remove(long key) { V prev = null; int index = index(key); if (index >= 0) { prev = _values[index]; removeAt(index); // clear key,state; adjust size } return prev; }
public final boolean execute(long key, Object value) { int index = _otherMap.index(key); if (index >= 0 && eq(value, _otherMap.get(key))) { return true; } return false; }