K - The data type for keys in the mapV - The data type for entries in the mappublic class OrderedMap<K,V>
extends java.lang.Object
implements java.util.Map<K,V>
This is accomplished by storing the key values separately from the internal Map, in an ordered List object.
Since you normally don't care what order that entries are stored in within a Map, this is intended primarily for creating JSON help documentation, where keeping a consistent order of fields makes it easier for the reader to understand.
| Constructor and Description |
|---|
OrderedMap()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
V |
get(java.lang.Object key) |
boolean |
isEmpty() |
java.util.Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(java.util.Map<? extends K,? extends V> m) |
V |
remove(java.lang.Object key) |
int |
size() |
java.util.Collection<V> |
values() |