org.apache.felix.ipojo.context

## Class StringMap

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.TreeMap
    - - org.apache.felix.ipojo.context.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.

Author:
  Felix Project Team
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

Constructors
Constructor and Description
`StringMap()` Constructor.
`StringMap(boolean caseSensitive)` Constructor.
`StringMap(java.util.Map map, boolean caseSensitive)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `isCaseSensitive()` Check if the map is case-sensitive.
`java.lang.Object` `put(java.lang.Object key, java.lang.Object value)` Put a record in the map.
`void` `setCaseSensitive(boolean flag)` Set the case sensitivity.

### Methods inherited from class java.util.TreeMap

`ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, putAll, remove, replace, replace, replaceAll, 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

`compute, computeIfAbsent, computeIfPresent, equals, getOrDefault, hashCode, isEmpty, merge, putIfAbsent, remove`

### Constructor Detail

#### StringMap

    public StringMap()

Constructor.

#### StringMap

    public StringMap(boolean caseSensitive)

Constructor.

Parameters:
  `caseSensitive` - : fix if the map if case sensitive or not.

#### StringMap

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

Constructor.

Parameters:
  `map` - : initial properties.
  `caseSensitive` - : fix if the map if case sensitive or not.

### Method Detail

#### put

    public java.lang.Object put(java.lang.Object key,
                                java.lang.Object value)

Put a record in the map.

Specified by:
  `put` in interface `java.util.Map`
Overrides:
  `put` in class `java.util.TreeMap`
Parameters:
  `key` - : key
  `value` - : value
Returns:
  an object.
See Also:
  `TreeMap.put(Object, Object)`

#### isCaseSensitive

    public boolean isCaseSensitive()

Check if the map is case-sensitive.

Returns:
  true if the map is case sensitive.

#### setCaseSensitive

    public void setCaseSensitive(boolean flag)

Set the case sensitivity.

Parameters:
  `flag` - : the new case sensitivity.