public class OrderedMap<K,V> extends Object implements Map<K,V>, Serializable
Constructor and Description |
---|
OrderedMap()
Construct with predictable insertion order.
|
OrderedMap(boolean lru)
Construct with predictable iteration order.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
int |
indexOf(Object key) |
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
V |
remove(Object key) |
int |
size() |
Collection<V> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
public OrderedMap()
public OrderedMap(boolean lru)
lru
- if true the iterator order is based on last access, false for order of insertion.public int indexOf(Object key)
public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
public boolean containsValue(Object value)
containsValue
in interface Map<K,V>
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.