net.craftforge.commons.collections
Class CaseInsensitiveMap<V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,V>
          extended by net.craftforge.commons.collections.CaseInsensitiveMap<V>
All Implemented Interfaces:
Serializable, Cloneable, Map<String,V>

public class CaseInsensitiveMap<V>
extends HashMap<String,V>

A map for case-insensitive String keys.

Since:
07.07.11
Author:
Christian Bick
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
CaseInsensitiveMap()
           
 
Method Summary
 boolean containsKey(Object key)
           The key is case-insensitive.
 V get(Object key)
           The key is case-insensitive.
 V put(String key, V value)
           The key is case-insensitive.
 
Methods inherited from class java.util.HashMap
clear, clone, containsValue, entrySet, 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

CaseInsensitiveMap

public CaseInsensitiveMap()
Method Detail

put

public V put(String key,
             V value)

The key is case-insensitive.

Specified by:
put in interface Map<String,V>
Overrides:
put in class HashMap<String,V>

get

public V get(Object key)

The key is case-insensitive.

Specified by:
get in interface Map<String,V>
Overrides:
get in class HashMap<String,V>

containsKey

public boolean containsKey(Object key)

The key is case-insensitive.

Specified by:
containsKey in interface Map<String,V>
Overrides:
containsKey in class HashMap<String,V>


Copyright © 2011. All Rights Reserved.