Package org.jheaps.tree
Class BinaryTreeAddressableHeap.Node
- java.lang.Object
-
- org.jheaps.tree.BinaryTreeAddressableHeap.Node
-
- All Implemented Interfaces:
java.io.Serializable,AddressableHeap.Handle<K,V>
- Enclosing class:
- BinaryTreeAddressableHeap<K,V>
private class BinaryTreeAddressableHeap.Node extends java.lang.Object implements AddressableHeap.Handle<K,V>, java.io.Serializable
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Kkey(package private) BinaryTreeAddressableHeap.Nodeo_cprivate static longserialVersionUID(package private) Vvalue(package private) BinaryTreeAddressableHeap.Nodey_s
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecreaseKey(K newKey)Decrease the key of the element.voiddelete()Delete the element from the heap that it belongs.KgetKey()Return the key of the element.VgetValue()Return the value of the element.voidsetValue(V value)Set the value of the element.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
key
K key
-
value
V value
-
o_c
BinaryTreeAddressableHeap.Node o_c
-
y_s
BinaryTreeAddressableHeap.Node y_s
-
-
Method Detail
-
getKey
public K getKey()
Description copied from interface:AddressableHeap.HandleReturn the key of the element.- Specified by:
getKeyin interfaceAddressableHeap.Handle<K,V>- Returns:
- the key of the element
-
getValue
public V getValue()
Description copied from interface:AddressableHeap.HandleReturn the value of the element.- Specified by:
getValuein interfaceAddressableHeap.Handle<K,V>- Returns:
- the value of the element
-
setValue
public void setValue(V value)
Description copied from interface:AddressableHeap.HandleSet the value of the element.- Specified by:
setValuein interfaceAddressableHeap.Handle<K,V>- Parameters:
value- the new value
-
decreaseKey
public void decreaseKey(K newKey)
Description copied from interface:AddressableHeap.HandleDecrease the key of the element.- Specified by:
decreaseKeyin interfaceAddressableHeap.Handle<K,V>- Parameters:
newKey- the new key
-
delete
public void delete()
Description copied from interface:AddressableHeap.HandleDelete the element from the heap that it belongs.- Specified by:
deletein interfaceAddressableHeap.Handle<K,V>
-
-