Package org.apache.openjpa.lib.util
Class OrderedMap<K,V>
java.lang.Object
org.apache.openjpa.lib.util.OrderedMap<K,V>
- All Implemented Interfaces:
Serializable
,Map<K,
V>
A Map with predictable iteration order.
- Since:
- 2.0.0
- Author:
- Pinaki Poddar
- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionConstruct with predictable insertion order.OrderedMap
(boolean lru) Construct with predictable iteration order. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
int
boolean
isEmpty()
keySet()
void
int
size()
values()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
OrderedMap
public OrderedMap()Construct with predictable insertion order. -
OrderedMap
public OrderedMap(boolean lru) Construct with predictable iteration order.- Parameters:
lru
- if true the iterator order is based on last access, false for order of insertion.
-
-
Method Details
-
indexOf
-
clear
public void clear() -
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
entrySet
-
get
-
isEmpty
public boolean isEmpty() -
keySet
-
put
-
putAll
-
remove
-
size
public int size() -
values
-