org.apache.directory.shared.ldap.util
Class NoDuplicateKeysMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by org.apache.directory.shared.ldap.util.NoDuplicateKeysMap
All Implemented Interfaces:
Serializable, Cloneable, Map

public class NoDuplicateKeysMap
extends HashMap

A Map implementation derived from HashMap that only overrides a single method put() in order to prevent duplicate keyed entries to be added.

Version:
$Rev: 434411 $
Author:
Apache Directory Project
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
NoDuplicateKeysMap()
           
 
Method Summary
 Object put(Object key, Object value)
          Overrides java.util.Map.put(java.lang.Object, java.lang.Object) to prevent duplicate keys.
 
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

NoDuplicateKeysMap

public NoDuplicateKeysMap()
Method Detail

put

public Object put(Object key,
                  Object value)
           throws IllegalArgumentException
Overrides java.util.Map.put(java.lang.Object, java.lang.Object) to prevent duplicate keys.

Specified by:
put in interface Map
Overrides:
put in class HashMap
Throws:
IllegalArgumentException
See Also:
Map.put(java.lang.Object, java.lang.Object)


Copyright © 2004-2012. All Rights Reserved.