Package org.apache.felix.cm.impl
Class CaseInsensitiveDictionary
The
CaseInsensitiveDictionary is a
java.util.Dictionary which conforms to the requirements laid
out by the Configuration Admin Service Specification requiring the property
names to keep case but to ignore case when accessing the properties.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<String> The backend dictionary with lower case keys. -
Constructor Summary
ConstructorsConstructorDescriptionCaseInsensitiveDictionary(CaseInsensitiveDictionary props, boolean deepCopy) -
Method Summary
Modifier and TypeMethodDescription(package private) static StringEnsures thekeycomplies with the symbolic-name production of the OSGi core specification (1.3.2):(package private) static ObjectcheckValue(Object value) elements()booleaninthashCode()booleanisEmpty()keys()intsize()private static chartoLowerCaseFast(char ch) toString()static Dictionary<String, Object> unmodifiable(Dictionary<String, Object> dict)
-
Field Details
-
internalMap
The backend dictionary with lower case keys. -
KNOWN
-
CASE_INSENSITIVE_ORDER
-
-
Constructor Details
-
CaseInsensitiveDictionary
public CaseInsensitiveDictionary() -
CaseInsensitiveDictionary
-
CaseInsensitiveDictionary
CaseInsensitiveDictionary(CaseInsensitiveDictionary props, boolean deepCopy)
-
-
Method Details
-
elements
- Specified by:
elementsin classDictionary<String,Object>
-
get
- Specified by:
getin classDictionary<String,Object>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin classDictionary<String,Object>
-
keys
- Specified by:
keysin classDictionary<String,Object>
-
put
- Specified by:
putin classDictionary<String,Object>
-
remove
- Specified by:
removein classDictionary<String,Object>
-
size
public int size()- Specified by:
sizein classDictionary<String,Object>
-
checkKey
Ensures thekeycomplies with the symbolic-name production of the OSGi core specification (1.3.2):symbolic-name :: = token('.'token)* digit ::= [0..9] alpha ::= [a..zA..Z] alphanum ::= alpha | digit token ::= ( alphanum | ’_’ | ’-’ )+If the key does not comply anIllegalArgumentExceptionis thrown.- Parameters:
keyObject- The configuration property key to check.- Throws:
IllegalArgumentException- if the key does not comply with the symbolic-name production.
-
checkValue
-
toString
-
hashCode
public int hashCode() -
equals
-
unmodifiable
-
toLowerCaseFast
private static char toLowerCaseFast(char ch)
-