edu.tum.cs.commons.collections
Class ArrayBackedStringMap<V>
java.lang.Object
edu.tum.cs.commons.collections.ArrayBackedMap<String,V>
edu.tum.cs.commons.collections.ArrayBackedStringMap<V>
- All Implemented Interfaces:
- Map<String,V>
public class ArrayBackedStringMap<V>
- extends ArrayBackedMap<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 |
Map.Entry<K,V> |
|
Method Summary |
protected boolean |
areEqual(String key1,
String key2)
Template method for comparing two keys for equality. |
protected String |
internKey(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 |
ArrayBackedStringMap
public ArrayBackedStringMap()
- Constructor.
ArrayBackedStringMap
public ArrayBackedStringMap(int initialCapacity)
- Constructor.
internKey
protected String internKey(Object key)
throws 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<String,V>
- Throws:
ClassCastException - if the provided key is not of a suitable class.
areEqual
protected boolean areEqual(String key1,
String key2)
- Template method for comparing two keys for equality.
- Overrides:
areEqual in class ArrayBackedMap<String,V>
TUM CCSM Commons - 2.7