org.hippoecm.hst.util
Class DuplicateKeyNotAllowedHashMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
org.hippoecm.hst.util.DuplicateKeyNotAllowedHashMap<K,V>
- Type Parameters:
K
- V
-
- All Implemented Interfaces:
- Serializable, Cloneable, Map<K,V>
public class DuplicateKeyNotAllowedHashMap<K,V>
- extends HashMap<K,V>
A HashMap that throws an exception when you put in the same key twice
- See Also:
- Serialized Form
Method Summary |
V |
put(K key,
V value)
|
Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, putAll, remove, size, values |
DuplicateKeyNotAllowedHashMap
public DuplicateKeyNotAllowedHashMap()
put
public V put(K key,
V value)
throws IllegalArgumentException
- Specified by:
put
in interface Map<K,V>
- Overrides:
put
in class HashMap<K,V>
- Throws:
IllegalArgumentException
Copyright © 2008-2012 Hippo. All Rights Reserved.