Package com.twelvemonkeys.util
Class LinkedMap.LinkedEntry<K,V>
java.lang.Object
com.twelvemonkeys.util.AbstractDecoratedMap.BasicEntry<K,V>
com.twelvemonkeys.util.LinkedMap.LinkedEntry<K,V>
- All Implemented Interfaces:
Serializable
,Map.Entry<K,
V>
protected static class LinkedMap.LinkedEntry<K,V>
extends AbstractDecoratedMap.BasicEntry<K,V>
implements Serializable
Linked list implementation of
Map.Entry
.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) LinkedMap.LinkedEntry
<K, V> (package private) LinkedMap.LinkedEntry
<K, V> Fields inherited from class com.twelvemonkeys.util.AbstractDecoratedMap.BasicEntry
mKey, mValue
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
addBefore
(LinkedMap.LinkedEntry<K, V> pExisting) Adds this entry before the given entry (which must be an existing entry) in the list.protected void
recordAccess
(Map<K, V> pMap) If the entry is part of an access ordered list, moves the entry to the end of the list.protected void
recordRemoval
(Map<K, V> pMap) Removes this entry from the linked list.(package private) void
remove()
Removes this entry from the linked list.
-
Field Details
-
previous
LinkedMap.LinkedEntry<K,V> previous -
next
LinkedMap.LinkedEntry<K,V> next
-
-
Constructor Details
-
LinkedEntry
LinkedEntry(K pKey, V pValue, LinkedMap.LinkedEntry<K, V> pNext)
-
-
Method Details
-
addBefore
Adds this entry before the given entry (which must be an existing entry) in the list.- Parameters:
pExisting
- the entry to add before
-
remove
void remove()Removes this entry from the linked list. -
recordAccess
If the entry is part of an access ordered list, moves the entry to the end of the list.- Overrides:
recordAccess
in classAbstractDecoratedMap.BasicEntry<K,
V> - Parameters:
pMap
- the map to record access for
-
recordRemoval
Removes this entry from the linked list.- Overrides:
recordRemoval
in classAbstractDecoratedMap.BasicEntry<K,
V> - Parameters:
pMap
- the map to record removal from
-