org.hippoecm.hst.util
Class DuplicateKeyNotAllowedHashMap<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
DuplicateKeyNotAllowedHashMap()
           
 
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
 
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

DuplicateKeyNotAllowedHashMap

public DuplicateKeyNotAllowedHashMap()
Method Detail

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.