|
|
|||||||||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.utilities.pairs.Pair<K,V>
de.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 |
|---|
| Fields inherited from class de.lmu.ifi.dbs.elki.utilities.pairs.Pair |
|---|
first, second |
| 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 de.lmu.ifi.dbs.elki.utilities.pairs.Pair |
|---|
equals, getFirst, getSecond, hashCode, newPairArray, setFirst, setSecond |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultHeapNode()
public DefaultHeapNode(K key,
V value)
key - the key of this heap nodevalue - the value of this heap node| Method 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 Pair<K extends Comparable<K>,V extends Identifiable>
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||