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

java.lang.Objectjava.util.WeakHashMap.WeakBucket.WeakEntry
- All Implemented Interfaces:
- Map.Entry
- Enclosing class:
- WeakHashMap.WeakBucket
- class WeakHashMap.WeakBucket.WeakEntry
- extends java.lang.Object
- implements Map.Entry
- extends java.lang.Object
This class gives the Entry representation of the
current bucket. It also keeps a strong reference to the
key; bad things may happen otherwise.
| Field Summary | |
(package private) java.lang.Object |
key
The strong ref to the key. |
| Constructor Summary | |
WeakHashMap.WeakBucket.WeakEntry(java.lang.Object key)
Creates a new entry for the key. |
|
| Method Summary | |
boolean |
equals(java.lang.Object o)
The equals method as specified in the Entry interface. |
WeakHashMap.WeakBucket |
getBucket()
Returns the underlying bucket. |
java.lang.Object |
getKey()
Returns the key. |
java.lang.Object |
getValue()
Returns the value. |
int |
hashCode()
The hashCode as specified in the Entry interface. |
java.lang.Object |
setValue(java.lang.Object newVal)
This changes the value. |
java.lang.String |
toString()
Convert this Object to a human-readable String. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
key
java.lang.Object key
- The strong ref to the key.
| Constructor Detail |
WeakHashMap.WeakBucket.WeakEntry
public WeakHashMap.WeakBucket.WeakEntry(java.lang.Object key)
- Creates a new entry for the key.
| Method Detail |
getBucket
public WeakHashMap.WeakBucket getBucket()
- Returns the underlying bucket.
getKey
public java.lang.Object getKey()
getValue
public java.lang.Object getValue()
setValue
public java.lang.Object setValue(java.lang.Object newVal)
- This changes the value. This change takes place in
the underlying hash map.
hashCode
public int hashCode()
equals
public boolean equals(java.lang.Object o)
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
|
|||||||||
| Home >> All >> java >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
java.util.WeakHashMap.WeakBucket.WeakEntry