|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.semanticweb.elk.util.collections.entryset.StrongKeyEntry<T,K>
T - the type of the keys for linked entriesK - the type of the key of this entrypublic abstract class StrongKeyEntry<T,K>
A prototype class for entries with keys. Sub-classes should implement the method for computing the equality function for the entry and hash code of the keys, which will be used for initializing the hash code of the entry. The hashCode and equals method should be compatible as usual.
| Field Summary | |
|---|---|
protected int |
hash
The value used as a hash code of this entry |
protected K |
key
|
| Constructor Summary | |
|---|---|
StrongKeyEntry(K key)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final K key
protected final int hash
| Constructor Detail |
|---|
public StrongKeyEntry(K key)
| Method Detail |
|---|
public K getKey()
getKey in interface KeyEntry<T,K>public 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 int hashCode()
hashCode in class Objectpublic abstract int computeHashCode()
equals(Object) method usual.
public abstract boolean equals(Object object)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||