|
|||||||||
| Home >> All >> java >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.util
Class IdentityHashMap.IdentityEntry

java.lang.Objectjava.util.IdentityHashMap.IdentityEntry
- All Implemented Interfaces:
- Map.Entry
- Enclosing class:
- IdentityHashMap
- private final class IdentityHashMap.IdentityEntry
- extends java.lang.Object
- implements Map.Entry
- extends java.lang.Object
This class provides Map.Entry objects for IdentityHashMaps. The entry is fail-fast, and will throw a ConcurrentModificationException if the underlying map is modified, or if remove is called on the iterator that generated this object. It is identity based, so it violates the general contract of Map.Entry, and is probably unsuitable for comparison to normal maps; but it works among other IdentityHashMaps.
| Field Summary | |
(package private) int |
knownMod
The number of modifications to the backing Map that we know about. |
(package private) int |
loc
The location of this entry. |
| Constructor Summary | |
(package private) |
IdentityHashMap.IdentityEntry(int loc)
Constructs the Entry. |
| Method Summary | |
boolean |
equals(java.lang.Object o)
Compares the specified object with this entry, using identity semantics. |
java.lang.Object |
getKey()
Returns the key of this entry. |
java.lang.Object |
getValue()
Returns the value of this entry. |
int |
hashCode()
Returns the hashcode of the entry, using identity semantics. |
java.lang.Object |
setValue(java.lang.Object value)
Replaces the value of this mapping, and returns the old value. |
java.lang.String |
toString()
This provides a string representation of the entry. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
loc
final int loc
- The location of this entry.
knownMod
final int knownMod
- The number of modifications to the backing Map that we know about.
| Constructor Detail |
IdentityHashMap.IdentityEntry
IdentityHashMap.IdentityEntry(int loc)
- Constructs the Entry.
| Method Detail |
equals
public boolean equals(java.lang.Object o)
- Compares the specified object with this entry, using identity
semantics. Note that this can lead to undefined results with
Entry objects created by normal maps.
getKey
public java.lang.Object getKey()
getValue
public java.lang.Object getValue()
hashCode
public int hashCode()
- Returns the hashcode of the entry, using identity semantics.
Note that this can lead to undefined results with Entry objects
created by normal maps.
setValue
public java.lang.Object setValue(java.lang.Object value)
- Replaces the value of this mapping, and returns the old value.
toString
public java.lang.String toString()
- This provides a string representation of the entry. It is of the form
"key=value", where string concatenation is used on key and value.
|
|||||||||
| Home >> All >> java >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
java.util.IdentityHashMap.IdentityEntry