K - the type of the keys of the recordT - the type of the next element the record is connected withpublic abstract class WeakKeyEntry<K,T> extends WeakReference<K> implements KeyEntry<T,K>
| Modifier and Type | Field and Description |
|---|---|
protected int |
hash
The value used as a hash code of this record
|
protected KeyEntry<T,? extends T> |
next
The reference to the next element
|
| Constructor and Description |
|---|
WeakKeyEntry(K key)
Create a weak record for the key
|
| Modifier and Type | Method and Description |
|---|---|
abstract int |
computeHashCode()
Compute the value which will be used as a final hash code for this
object.
|
abstract boolean |
equals(Object object) |
K |
getKey() |
KeyEntry<T,? extends T> |
getNext()
Returns the next next element of the entry, or null if there is no next
element
|
int |
hashCode() |
void |
setNext(KeyEntry<T,? extends T> next)
Setting the input element as the next element of the entry.
|
clear, enqueue, get, isEnqueuedpublic WeakKeyEntry(K key)
key - the key for which the weak record is createdpublic void setNext(KeyEntry<T,? extends T> next)
next - the object that should be set as the next element of the
recordpublic KeyEntry<T,? extends T> getNext()
public abstract int computeHashCode()
equals(Object) method usual.Copyright © 2011-2015 Department of Computer Science, University of Oxford. All Rights Reserved.