edu.stanford.nlp.util
Class MapFactory
java.lang.Object
edu.stanford.nlp.util.MapFactory
- All Implemented Interfaces:
- java.io.Serializable
public abstract class MapFactory
- extends java.lang.Object
- implements java.io.Serializable
A factory class for vending different sorts of Maps.
- See Also:
- Serialized Form
Method Summary |
abstract java.util.Map |
newMap()
Returns a new non-parameterized map of a particular sort. |
abstract java.util.Map |
newMap(int initCapacity)
Returns a new non-parameterized map of a particular sort with an initial capacity. |
abstract
<K1,V1> java.util.Map<K1,V1> |
|
setMap(java.util.Map<K1,V1> map)
A method to get a parameterized (genericized) map out. |
abstract
<K1,V1> java.util.Map<K1,V1> |
|
setMap(java.util.Map<K1,V1> map,
int initCapacity)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HASH_MAP_FACTORY
public static final MapFactory HASH_MAP_FACTORY
IDENTITY_HASH_MAP_FACTORY
public static final MapFactory IDENTITY_HASH_MAP_FACTORY
WEAK_HASH_MAP_FACTORY
public static final MapFactory WEAK_HASH_MAP_FACTORY
TREE_MAP_FACTORY
public static final MapFactory TREE_MAP_FACTORY
ARRAY_MAP_FACTORY
public static final MapFactory ARRAY_MAP_FACTORY
MapFactory
public MapFactory()
newMap
public abstract java.util.Map newMap()
- Returns a new non-parameterized map of a particular sort.
newMap
public abstract java.util.Map newMap(int initCapacity)
- Returns a new non-parameterized map of a particular sort with an initial capacity.
- Parameters:
initCapacity
- initial capacity of the map
setMap
public abstract <K1,V1> java.util.Map<K1,V1> setMap(java.util.Map<K1,V1> map)
- A method to get a parameterized (genericized) map out.
- Parameters:
map
- A type-parameterized Map
argument
- Returns:
- A
Map
with type-parameterization identical to that of
the argument.
setMap
public abstract <K1,V1> java.util.Map<K1,V1> setMap(java.util.Map<K1,V1> map,
int initCapacity)