/** * {@inheritDoc} * * @throws NullPointerException if any of the arguments are null */ @Override public boolean replace(K key, V oldValue, V newValue) { if ( oldValue == null || newValue == null ) { throw new NullPointerException(); } int hash = hash( key.hashCode() ); return segmentFor( hash ).replace( key, hash, oldValue, newValue ); }
/** * {@inheritDoc} * * @return the previous value associated with the specified key, * or <tt>null</tt> if there was no mapping for the key * * @throws NullPointerException if the specified key or value is null */ @Override public V replace(K key, V value) { if ( value == null ) { throw new NullPointerException(); } int hash = hash( key.hashCode() ); return segmentFor( hash ).replace( key, hash, value ); }
/** * {@inheritDoc} * * @throws NullPointerException if any of the arguments are null */ @Override public boolean replace(K key, V oldValue, V newValue) { if ( oldValue == null || newValue == null ) { throw new NullPointerException(); } int hash = hash( key.hashCode() ); return segmentFor( hash ).replace( key, hash, oldValue, newValue ); }
/** * {@inheritDoc} * * @return the previous value associated with the specified key, * or <tt>null</tt> if there was no mapping for the key * * @throws NullPointerException if the specified key or value is null */ @Override public V replace(K key, V value) { if ( value == null ) { throw new NullPointerException(); } int hash = hash( key.hashCode() ); return segmentFor( hash ).replace( key, hash, value ); }