Package org.jibx.util
Class InsertionOrderedMap
java.lang.Object
org.jibx.util.InsertionOrderedMap
- All Implemented Interfaces:
Map
Map with keys iterated in insertion order. This is similar to the Java 1.4
java.util.LinkedHashMap class, but compatible with earlier JVM versions. It
also guarantees insertion ordering only for iterating through the key values,
not for other iterations. This implementation is optimized for insert-only
maps.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classSet implementation backed by a list.protected classprotected class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
m_baseMap
-
m_insertList
-
-
Constructor Details
-
InsertionOrderedMap
public InsertionOrderedMap()
-
-
Method Details
-
clear
public void clear() -
containsKey
- Specified by:
containsKeyin interfaceMap
-
containsValue
- Specified by:
containsValuein interfaceMap
-
entrySet
-
get
-
isEmpty
public boolean isEmpty() -
keySet
-
put
-
putAll
-
remove
-
size
public int size() -
values
-
keyList
Get list of keys in order added. The returned list is live, and will grow or shrink as pairs are added to or removed from the map.- Returns:
- key list
-