|
terp - the Codemesh Modular Template Interpreter v1.3.304 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.TreeMap<java.lang.String,T>
com.codemesh.terp.util.CaseInsensitiveTreeMap<T>
public class CaseInsensitiveTreeMap<T>
A map that registers entries under their real name but creates lowercase aliases for them as well. This map will have the following behavior: - keys that differ in case can be distinguished if looked up using their exactly cased name. - keys that differ in case cannot be distinguished if looked up with a key that is not correctly cased. Iteration over the keys will be in case sensitive order because trying to make the underlying map case insensitive will change the put/get behavior.
| 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 | |
|---|---|
CaseInsensitiveTreeMap()
|
|
CaseInsensitiveTreeMap(java.util.Comparator<java.lang.String> comparator)
|
|
CaseInsensitiveTreeMap(java.util.Map<java.lang.String,T> m)
|
|
CaseInsensitiveTreeMap(java.util.SortedMap<java.lang.String,T> m)
|
|
| Method Summary | |
|---|---|
void |
addAlias(java.lang.String alias,
java.lang.String key)
Adds a name alias to the map. |
boolean |
containsKey(java.lang.Object okey)
|
java.util.Map<java.lang.String,T> |
filteredMap(Selector<T>... selectors)
Returns a filtered map whose entries are backed by this map but consist only of those that satisfy at least one of the selector criteria that are provided. |
T |
get(java.lang.Object okey)
|
java.lang.Object |
getFromNumber(java.lang.Number number)
Returns an object from the map based on a numeric key. |
T |
put(java.lang.String key,
T value)
|
void |
putAll(java.util.Map<? extends java.lang.String,? extends T> map)
|
void |
removeAlias(java.lang.String alias)
Removes a name alias from the map. |
void |
setFromNumber(java.lang.Number number,
T value)
|
| Methods inherited from class java.util.TreeMap |
|---|
ceilingEntry, ceilingKey, clear, clone, comparator, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, 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 |
|---|
public CaseInsensitiveTreeMap()
public CaseInsensitiveTreeMap(java.util.Comparator<java.lang.String> comparator)
public CaseInsensitiveTreeMap(java.util.Map<java.lang.String,T> m)
public CaseInsensitiveTreeMap(java.util.SortedMap<java.lang.String,T> m)
| Method Detail |
|---|
public void putAll(java.util.Map<? extends java.lang.String,? extends T> map)
putAll in interface java.util.Map<java.lang.String,T>putAll in class java.util.TreeMap<java.lang.String,T>
public T put(java.lang.String key,
T value)
put in interface java.util.Map<java.lang.String,T>put in class java.util.TreeMap<java.lang.String,T>public T get(java.lang.Object okey)
get in interface java.util.Map<java.lang.String,T>get in class java.util.TreeMap<java.lang.String,T>public boolean containsKey(java.lang.Object okey)
containsKey in interface java.util.Map<java.lang.String,T>containsKey in class java.util.TreeMap<java.lang.String,T>public java.lang.Object getFromNumber(java.lang.Number number)
Don't use this function to iterate over the map because its performance would be pretty horrible. It is intended to provide an entrypoint for integer properties like 'msvc.2005.compiler' where the integer is a version number and represents an attribute test rather than an index.
number - a number.
public void setFromNumber(java.lang.Number number,
T value)
public void addAlias(java.lang.String alias,
java.lang.String key)
alias - the alias for the key.key - the key.public void removeAlias(java.lang.String alias)
alias - the alias to be forgotten.public java.util.Map<java.lang.String,T> filteredMap(Selector<T>... selectors)
selectors - the selectors one of whose conditions must be met by
an element to be a member of the filtered map.
|
terp - the Codemesh Modular Template Interpreter v1.3.304 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||