org.apache.karaf.main
Class StringMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.TreeMap
          extended by org.apache.karaf.main.StringMap
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map, java.util.NavigableMap, java.util.SortedMap

public class StringMap
extends java.util.TreeMap

Simple utility class that creates a map for string-based keys by extending TreeMap. This map can be set to use case-sensitive or case-insensitive comparison when searching for the key. Any keys put into this map will be converted to a String using the toString() method, since it is only intended to compare strings.

See Also:
Serialized Form

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
StringMap()
           
StringMap(boolean caseSensitive)
           
StringMap(java.util.Map map, boolean caseSensitive)
           
 
Method Summary
 boolean isCaseSensitive()
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
           
 void setCaseSensitive(boolean b)
           
 
Methods inherited from class java.util.TreeMap
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, putAll, remove, size, subMap, subMap, tailMap, tailMap, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty
 

Constructor Detail

StringMap

public StringMap()

StringMap

public StringMap(boolean caseSensitive)

StringMap

public StringMap(java.util.Map map,
                 boolean caseSensitive)
Method Detail

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Specified by:
put in interface java.util.Map
Overrides:
put in class java.util.TreeMap

isCaseSensitive

public boolean isCaseSensitive()

setCaseSensitive

public void setCaseSensitive(boolean b)


Copyright © 2007-2011 Apache Software Foundation. All Rights Reserved.