Build 1.0_r1(from source)

java.util.concurrent
Class ConcurrentHashMap.SimpleEntry<K,V>

java.lang.Object
  extended by java.util.concurrent.ConcurrentHashMap.SimpleEntry<K,V>
All Implemented Interfaces:
Map.Entry<K,V>
Enclosing class:
ConcurrentHashMap<K,V>

static final class ConcurrentHashMap.SimpleEntry<K,V>
extends Object
implements Map.Entry<K,V>

This duplicates java.util.AbstractMap.SimpleEntry until this class is made accessible.


Field Summary
(package private)  K key
           
(package private)  V value
           
 
Constructor Summary
ConcurrentHashMap.SimpleEntry(K key, V value)
           
ConcurrentHashMap.SimpleEntry(Map.Entry<K,V> e)
           
 
Method Summary
(package private) static boolean eq(Object o1, Object o2)
           
 boolean equals(Object o)
          Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
 K getKey()
          Gets the key.
 V getValue()
          Gets the value.
 int hashCode()
          Returns an integer hash code for the receiver.
 V setValue(V value)
          Sets the value.
 String toString()
          Returns a string containing a concise, human-readable description of the receiver.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

key

K key

value

V value
Constructor Detail

ConcurrentHashMap.SimpleEntry

public ConcurrentHashMap.SimpleEntry(K key,
                                     V value)

ConcurrentHashMap.SimpleEntry

public ConcurrentHashMap.SimpleEntry(Map.Entry<K,V> e)
Method Detail

getKey

public K getKey()
Description copied from interface: Map.Entry
Gets the key.

Specified by:
getKey in interface Map.Entry<K,V>
Returns:
the key

getValue

public V getValue()
Description copied from interface: Map.Entry
Gets the value.

Specified by:
getValue in interface Map.Entry<K,V>
Returns:
the value

setValue

public V setValue(V value)
Description copied from interface: Map.Entry
Sets the value.

Specified by:
setValue in interface Map.Entry<K,V>
Parameters:
value - the new value
Returns:
object

equals

public boolean equals(Object o)
Description copied from class: Object
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. The implementation in Object returns true only if the argument is the exact same object as the receiver (==).

Specified by:
equals in interface Map.Entry<K,V>
Overrides:
equals in class Object
Parameters:
o - Object the object to compare with this object.
Returns:
boolean true if the object is the same as this object false if it is different from this object.
See Also:
Object.hashCode()

hashCode

public int hashCode()
Description copied from class: Object
Returns an integer hash code for the receiver. Any two objects which answer true when passed to .equals must answer the same value for this method.

Specified by:
hashCode in interface Map.Entry<K,V>
Overrides:
hashCode in class Object
Returns:
int the receiver's hash.
See Also:
Object.equals(java.lang.Object)

toString

public String toString()
Description copied from class: Object
Returns a string containing a concise, human-readable description of the receiver.

Overrides:
toString in class Object
Returns:
String a printable representation for the receiver.

eq

static boolean eq(Object o1,
                  Object o2)

Build 1.0_r1(from source)

Please submit a feedback, bug or feature