|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<K,V>
hudson.plugins.violations.util.HashMapWithDefault<K,V>
K - the type of key for this map.V - the type of mapped value.public class HashMapWithDefault<K,V>
An extension of a hash map with a default value for keys not present.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
| Constructor Summary | |
|---|---|
HashMapWithDefault(V defaultValue)
Construct a new hash map. |
|
| Method Summary | |
|---|---|
V |
get(java.lang.Object k)
Get a value for a key. |
| Methods inherited from class java.util.HashMap |
|---|
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
|---|
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public HashMapWithDefault(V defaultValue)
defaultValue - the value to use if a key cannot be found.| Method Detail |
|---|
public V get(java.lang.Object k)
get in interface java.util.Map<K,V>get in class java.util.HashMap<K,V>k - the key to use to lookup the map.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||