java.lang.Object
java.util.AbstractMap<K,V>
org.pcollections.AbstractUnmodifiableMap<K,V>
org.pcollections.OrderedPMap<K,V>
- Type Parameters:
K-V-
- All Implemented Interfaces:
Serializable,Map<K,,V> PMap<K,V>
public class OrderedPMap<K,V>
extends AbstractUnmodifiableMap<K,V>
implements PMap<K,V>, Serializable
Like
PMap but preserves insertion order. Persistent equivalent of LinkedHashMap.
Note that, like LinkedHashMap, insertion order is not affected if a key is re-inserted
into the map.
(Note: this is different from PSortedMap, which keeps elements in the order specified
by Comparable.compareTo(Object) or Comparator.compare(Object, Object).)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,V> OrderedPMap<K, V> empty()entrySet()static <K,V> OrderedPMap<K, V> minusAll(Collection<?> keys) static <K,V> OrderedPMap<K, V> singleton(K k, V v) intsize()Methods inherited from class org.pcollections.AbstractUnmodifiableMap
clear, compute, computeIfAbsent, computeIfPresent, merge, put, putAll, putIfAbsent, remove, replace, replaceAllMethods inherited from class java.util.AbstractMap
clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, values
-
Method Details
-
empty
-
from
-
singleton
-
get
-
plus
-
plusAll
-
minus
-
minusAll
-
entrySet
-
size
public int size()
-