K - the type of keys maintained by this mapV - the type of mapped valuespublic class DefaultingDictionary<K,V> extends LinkedHashMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
DefaultingDictionary(V defaultValue)
Construct the defaultingDictionary using the defaultValue provided.
|
DefaultingDictionary(V defaultValue,
Map<K,V> defaultingDictionaryMap)
Construct DefaultingDictionary using the given defaultValue and entries from the given defaultingDictionaryMap.
|
| Modifier and Type | Method and Description |
|---|---|
V |
get(Object key) |
V |
getDefaultValue()
Return the defaultValue for this class.
|
clear, containsValue, entrySet, forEach, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeequals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizepublic DefaultingDictionary(V defaultValue)
defaultValue - The defaultValue to be returned if a key is not present in the mappublic DefaultingDictionary(V defaultValue, Map<K,V> defaultingDictionaryMap)
defaultValue - The defaultValue to be returned if a key is not present in the mapdefaultingDictionaryMap - A Map whose entries will be inserted into the DefaultingDictionaryCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.