Class KeyMap<T>
- All Implemented Interfaces:
Serializable, Cloneable, Iterable<String>, Map<String,T>, SequencedMap<String, T>
- Direct Known Subclasses:
AddressParser.ParameterMap
The
KeyMap object is used to represent a map of values
keyed using a known string. This also ensures that the keys and
the values added to this hash map can be acquired in an independent
list of values, ensuring that modifications to the map do not have
an impact on the lists provided, and vice versa. The key map can
also be used in a fore each look using the string keys.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, valuesMethods inherited from class HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class AbstractMap
equals, hashCode, toStringMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from interface SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Constructor Details
-
KeyMap
public KeyMap()Constructor for theKeyMapobject. This creates a hash map that can expose the keys and values of the map as an independentListcontaining the values. This can also be used within a for loop for convenience.
-
-
Method Details
-
iterator
This is used to produce anIteratorof values that can be used to acquire the contents of the key map within a for each loop. The key map can be modified while it is been iterated as the iterator is an independent list of values. -
getKeys
-
getValues
-