|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.utilities.heap.DefaultHeapNode<K,V>
K
- Key typeV
- Value typepublic class DefaultHeapNode<K extends Comparable<K>,V extends Identifiable>
A default implementation of an object that can be stored in a heap.
Field Summary | |
---|---|
private K |
key
The key of this heap node. |
private V |
value
The value of this heap node. |
Constructor Summary | |
---|---|
DefaultHeapNode()
Empty constructor for serialization purposes. |
|
DefaultHeapNode(K key,
V value)
Creates a new heap node with the specified parameters. |
Method Summary | |
---|---|
int |
compareTo(HeapNode<K,V> heapNode)
Compares this HeapNode with the specified HeapNode. |
K |
getKey()
Returns the key of this heap node. |
V |
getValue()
Returns the value of this heap node. |
void |
setKey(K key)
Sets the key of this HeapNode. |
void |
setValue(V value)
Sets the value of this HeapNode. |
String |
toString()
Returns a string representation of this heap node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private K extends Comparable<K> key
private V extends Identifiable value
Constructor Detail |
---|
public DefaultHeapNode()
public DefaultHeapNode(K key, V value)
key
- the key of this heap nodevalue
- the value of this heap nodeMethod Detail |
---|
public int compareTo(HeapNode<K,V> heapNode)
compareTo
in interface Comparable<HeapNode<K extends Comparable<K>,V extends Identifiable>>
heapNode
- HeapNode to be compared
public V getValue()
getValue
in interface HeapNode<K extends Comparable<K>,V extends Identifiable>
public void setValue(V value)
setValue
in interface HeapNode<K extends Comparable<K>,V extends Identifiable>
value
- the value to be setpublic K getKey()
getKey
in interface HeapNode<K extends Comparable<K>,V extends Identifiable>
public void setKey(K key)
setKey
in interface HeapNode<K extends Comparable<K>,V extends Identifiable>
key
- the key to be setpublic String toString()
toString
in class Object
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |