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:
java.io.Serializable
,java.util.Map.Entry<K,V>
protected static class LinkedMap.LinkedEntry<K,V> extends AbstractDecoratedMap.BasicEntry<K,V> implements java.io.Serializable
Linked list implementation ofMap.Entry
.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) LinkedMap.LinkedEntry<K,V>
next
(package private) LinkedMap.LinkedEntry<K,V>
previous
-
Fields inherited from class com.twelvemonkeys.util.AbstractDecoratedMap.BasicEntry
mKey, mValue
-
-
Constructor Summary
Constructors Constructor Description LinkedEntry(K pKey, V pValue, LinkedMap.LinkedEntry<K,V> pNext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (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(java.util.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(java.util.Map<K,V> pMap)
Removes this entry from the linked list.(package private) void
remove()
Removes this entry from the linked list.
-
-
-
Field Detail
-
previous
LinkedMap.LinkedEntry<K,V> previous
-
next
LinkedMap.LinkedEntry<K,V> next
-
-
Constructor Detail
-
LinkedEntry
LinkedEntry(K pKey, V pValue, LinkedMap.LinkedEntry<K,V> pNext)
-
-
Method Detail
-
addBefore
void addBefore(LinkedMap.LinkedEntry<K,V> pExisting)
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
protected void recordAccess(java.util.Map<K,V> pMap)
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
protected void recordRemoval(java.util.Map<K,V> pMap)
Removes this entry from the linked list.- Overrides:
recordRemoval
in classAbstractDecoratedMap.BasicEntry<K,V>
- Parameters:
pMap
- the map to record removal from
-
-