final void removeStale() { KeyReference ref; while ( ( ref = (KeyReference) refQueue.poll() ) != null ) { remove( ref.keyRef(), ref.keyHash(), null, true ); } }
final void removeStale() { KeyReference ref; while ( ( ref = (KeyReference) refQueue.poll() ) != null ) { remove( ref.keyRef(), ref.keyHash(), null, true ); } }
/** * Removes the key (and its corresponding value) from this map. * This method does nothing if the key is not in the map. * * @param key the key that needs to be removed * * @return the previous value associated with <tt>key</tt>, or * <tt>null</tt> if there was no mapping for <tt>key</tt> * * @throws NullPointerException if the specified key is null */ @Override public V remove(Object key) { if ( key == null ) { return null; } int hash = hashOf( key ); return segmentFor( hash ).remove( key, hash, null, false ); }
/** * {@inheritDoc} * * @throws NullPointerException if the specified key is null */ @Override public boolean remove(Object key, Object value) { if ( key == null || value == null ) { return false; } int hash = hashOf( key ); return segmentFor( hash ).remove( key, hash, value, false ) != null; }
/** * Removes the key (and its corresponding value) from this map. * This method does nothing if the key is not in the map. * * @param key the key that needs to be removed * * @return the previous value associated with <tt>key</tt>, or * <tt>null</tt> if there was no mapping for <tt>key</tt> * * @throws NullPointerException if the specified key is null */ @Override public V remove(Object key) { if ( key == null ) { return null; } int hash = hashOf( key ); return segmentFor( hash ).remove( key, hash, null, false ); }
/** * {@inheritDoc} * * @throws NullPointerException if the specified key is null */ @Override public boolean remove(Object key, Object value) { if ( key == null || value == null ) { return false; } int hash = hashOf( key ); return segmentFor( hash ).remove( key, hash, value, false ) != null; }