org.apache.wicket.util.concurrent
Class ConcurrentHashMap.Entry
java.lang.Object
org.apache.wicket.util.concurrent.ConcurrentHashMap.Entry
- All Implemented Interfaces:
- java.util.Map.Entry
- Enclosing class:
- ConcurrentHashMap
protected static class ConcurrentHashMap.Entry
- extends java.lang.Object
- implements java.util.Map.Entry
ConcurrentHashMap collision list entry.
Method Summary |
boolean |
equals(java.lang.Object o)
|
java.lang.Object |
getKey()
|
java.lang.Object |
getValue()
Get the value. |
int |
hashCode()
|
java.lang.Object |
setValue(java.lang.Object value)
Set the value of this entry. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
key
protected final java.lang.Object key
value
protected volatile java.lang.Object value
hash
protected final int hash
next
protected final ConcurrentHashMap.Entry next
getKey
public java.lang.Object getKey()
- Specified by:
getKey
in interface java.util.Map.Entry
- See Also:
Map.Entry.getKey()
getValue
public java.lang.Object getValue()
- Get the value. Note: In an entrySet or entrySet.iterator, unless you can 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 java.util.Map.Entry
- Returns:
- the current value, or null if the entry has been detectably removed.
setValue
public java.lang.Object setValue(java.lang.Object value)
- Set the value of this entry. Note: In an entrySet or entrySet.iterator), unless you can
guarantee lack of concurrent modification, setValue is not strictly guaranteed
to actually replace the value field obtained via the get operation of the
underlying hash table 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 java.util.Map.Entry
- Parameters:
value
- the new value.
- Returns:
- the previous value, or null if entry has been detectably removed.
- Throws:
java.lang.NullPointerException
- if the value is null
.
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interface java.util.Map.Entry
- Overrides:
equals
in class java.lang.Object
- See Also:
Map.Entry.equals(java.lang.Object)
hashCode
public int hashCode()
- Specified by:
hashCode
in interface java.util.Map.Entry
- Overrides:
hashCode
in class java.lang.Object
- See Also:
Map.Entry.hashCode()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- See Also:
Object.toString()
Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.