edu.tum.cs.commons.collections
Class ArrayBackedStringMap<V>
java.lang.Object
edu.tum.cs.commons.collections.ArrayBackedMap<java.lang.String,V>
edu.tum.cs.commons.collections.ArrayBackedStringMap<V>
- All Implemented Interfaces:
- java.util.Map<java.lang.String,V>
public class ArrayBackedStringMap<V>
- extends ArrayBackedMap<java.lang.String,V>
A specialization of the array backed map for string keys. This uses string
interning and reference comparison.
- Version:
- $Rev: 29399 $
- Author:
- hummelb, $Author: juergens $
- Rating:
- GREEN Hash: A6370F398F915DFAA7510CD39DE491C0
Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
Method Summary |
protected boolean |
areEqual(java.lang.String key1,
java.lang.String key2)
Template method for comparing two keys for equality. |
protected java.lang.String |
internKey(java.lang.Object key)
Template method for calculating an internal key representation. |
Methods inherited from class edu.tum.cs.commons.collections.ArrayBackedMap |
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
ArrayBackedStringMap
public ArrayBackedStringMap()
- Constructor.
ArrayBackedStringMap
public ArrayBackedStringMap(int initialCapacity)
- Constructor.
internKey
protected java.lang.String internKey(java.lang.Object key)
throws java.lang.ClassCastException
- Template method for calculating an internal key representation. The
default implementation just performs a cast. This method may throw a
class cast exception if the provided key is not an instance of the key
type.
- Overrides:
internKey
in class ArrayBackedMap<java.lang.String,V>
- Throws:
java.lang.ClassCastException
- if the provided key is not of a suitable class.
areEqual
protected boolean areEqual(java.lang.String key1,
java.lang.String key2)
- Template method for comparing two keys for equality.
- Overrides:
areEqual
in class ArrayBackedMap<java.lang.String,V>
TUM CCSM Commons - 2.7