Package org.jheaps.tree
Class ReflectedHeap.ReflectedHandle<K,V>
java.lang.Object
org.jheaps.tree.ReflectedHeap.ReflectedHandle<K,V>
- All Implemented Interfaces:
Serializable
,AddressableHeap.Handle<K,
,V> DoubleEndedAddressableHeap.Handle<K,
V>
- Enclosing class:
ReflectedHeap<K,
V>
private static class ReflectedHeap.ReflectedHandle<K,V>
extends Object
implements DoubleEndedAddressableHeap.Handle<K,V>, Serializable
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) ReflectedHeap
<K, V> (package private) AddressableHeap.Handle
<K, ReflectedHeap.HandleMap<K, V>> (package private) K
(package private) boolean
private static final long
(package private) V
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
decreaseKey
(K newKey) Decrease the key of the element.void
delete()
Delete the element from the heap that it belongs.getKey()
Return the key of the element.(package private) ReflectedHeap
<K, V> getOwner()
getValue()
Return the value of the element.void
increaseKey
(K newKey) Increase the key of the element.void
Set the value of the element.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
heap
ReflectedHeap<K,V> heap -
key
K key -
value
V value -
minNotMax
boolean minNotMax -
inner
AddressableHeap.Handle<K,ReflectedHeap.HandleMap<K, innerV>>
-
-
Constructor Details
-
ReflectedHandle
-
-
Method Details
-
getKey
Return the key of the element.- Specified by:
getKey
in interfaceAddressableHeap.Handle<K,
V> - Returns:
- the key of the element
-
getValue
Return the value of the element.- Specified by:
getValue
in interfaceAddressableHeap.Handle<K,
V> - Returns:
- the value of the element
-
setValue
Set the value of the element.- Specified by:
setValue
in interfaceAddressableHeap.Handle<K,
V> - Parameters:
value
- the new value
-
decreaseKey
Decrease the key of the element.- Specified by:
decreaseKey
in interfaceAddressableHeap.Handle<K,
V> - Parameters:
newKey
- the new key
-
delete
public void delete()Delete the element from the heap that it belongs.- Specified by:
delete
in interfaceAddressableHeap.Handle<K,
V>
-
increaseKey
Increase the key of the element.- Specified by:
increaseKey
in interfaceDoubleEndedAddressableHeap.Handle<K,
V> - Parameters:
newKey
- the new key
-
getOwner
ReflectedHeap<K,V> getOwner()
-