protected static class WeakInterningHashSet.Entry<E>
extends java.lang.ref.WeakReference<E>
chained
in the WeakInterningHashSet.entries
to handle collisions.Modifier and Type | Field and Description |
---|---|
int |
hashCode
The cached hash code.
|
WeakInterningHashSet.Entry<E> |
next
The next entry in the collision chain.
|
Constructor and Description |
---|
WeakInterningHashSet.Entry(E object,
int hashCode,
java.lang.ref.ReferenceQueue<? super E> queue)
Creates an entry thats part of the set's
WeakInterningHashSet.internalQueue or WeakInterningHashSet.externalQueue . |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Specialized to call
doClear() . |
void |
clear(WeakInterningHashSet<E> set)
|
protected void |
doClear() |
WeakInterningHashSet.Entry<E> |
getNextEntry()
Returns the next entry in the collision chain with the same
hashCode . |
java.lang.String |
toString()
Returns the string value of the
referent . |
public final int hashCode
public WeakInterningHashSet.Entry<E> next
public WeakInterningHashSet.Entry(E object, int hashCode, java.lang.ref.ReferenceQueue<? super E> queue)
WeakInterningHashSet.internalQueue
or WeakInterningHashSet.externalQueue
.public final WeakInterningHashSet.Entry<E> getNextEntry()
hashCode
.public void clear()
doClear()
.
Derived classes should generally override this method only to impose synchronization.
All the cleaning up of the fields of the entry should be done in doClear()
.clear
in class java.lang.ref.Reference<E>
protected void doClear()
public final void clear(WeakInterningHashSet<E> set)
public java.lang.String toString()
referent
.toString
in class java.lang.Object