org.norther.tammi.acorn.util
Class ConcurrentAbstractMap.Entry

java.lang.Object
  extended by org.norther.tammi.acorn.util.ConcurrentAbstractMap.Entry
All Implemented Interfaces:
Map.Entry
Enclosing class:
ConcurrentAbstractMap

protected static class ConcurrentAbstractMap.Entry
extends Object
implements Map.Entry

An inner class for chained hash lists.


Method Summary
 boolean equals(Object o)
           
 Object getKey()
           
 Object getValue()
          Gets the value.
 int hashCode()
           
 Object setValue(Object v)
          Sets the value.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getKey

public Object getKey()
Specified by:
getKey in interface Map.Entry

getValue

public Object getValue()
Gets the value.

Note that in an entrySet or entrySet.iterator, unless the set or iterator is used under synchronization of the table as a whole (or you can otherwise guarantee lack of concurrent modification), getValue might return null, reflecting the fact that the entry has been concurrently removed. However, there are no assurances that concurrent removals will be reflected using this method.

Specified by:
getValue in interface Map.Entry
Returns:
the value or null if the entry has been removed.

setValue

public Object setValue(Object v)
Sets the value.

Note that in an entrySet or entrySet.iterator, unless the set or iterator is used under synchronization of the table as a whole (or you can otherwise guarantee lack of concurrent modification), setValue is not strictly guaranteed to actually replace the value field obtained via the get operation of the underlying map in multithreaded applications. If iterator-wide synchronization is not used, and any other concurrent put or remove operations occur, sometimes even to other entries, then this change is not guaranteed to be reflected in the hash table (it might, or it might not; there are no assurances either way).

Specified by:
setValue in interface Map.Entry
Parameters:
v - the new value.
Returns:
the previous value or null if the entry has been removed.

equals

public boolean equals(Object o)
Specified by:
equals in interface Map.Entry
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Map.Entry
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004 The Norther Organization. All rights reserved.