Package org.jheaps.dag
Class HollowHeap.Item<K,V>
java.lang.Object
org.jheaps.dag.HollowHeap.Item<K,V>
- All Implemented Interfaces:
Serializable,AddressableHeap.Handle<K,V>
- Enclosing class:
HollowHeap<K,V>
static class HollowHeap.Item<K,V>
extends Object
implements AddressableHeap.Handle<K,V>, Serializable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Kprivate HollowHeap.HollowNode<K, V> private static final longprivate V -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoiddecreaseKey(K newKey) Decrease the key of the element.voiddelete()Delete the element from the heap that it belongs.getKey()Return the key of the element.(package private) HollowHeap<K, V> getOwner()getValue()Return the value of the element.voidSet the value of the element.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
node
-
key
-
value
-
-
Constructor Details
-
Item
-
-
Method Details
-
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
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
Description copied from interface:AddressableHeap.HandleSet the value of the element.- Specified by:
setValuein interfaceAddressableHeap.Handle<K,V> - Parameters:
value- the new value
-
decreaseKey
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>
-
getOwner
HollowHeap<K,V> getOwner() -
checkInvalid
private void checkInvalid()
-