|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.util.MapFactory<K,V>
public abstract class MapFactory<K,V>
A factory class for vending different sorts of Maps.
Field Summary | |
---|---|
static MapFactory |
HASH_MAP_FACTORY
|
static MapFactory |
IDENTITY_HASH_MAP_FACTORY
|
Method Summary | ||
---|---|---|
static
|
arrayMapFactory()
Return a MapFactory that returns an ArrayMap. |
|
static
|
hashMapFactory()
Return a MapFactory that returns a HashMap. |
|
static
|
identityHashMapFactory()
Return a MapFactory that returns an IdentityHashMap. |
|
static
|
linkedHashMapFactory()
Return a MapFactory that returns an LinkedHashMap. |
|
abstract Map<K,V> |
newMap()
Returns a new non-parameterized map of a particular sort. |
|
abstract Map<K,V> |
newMap(int initCapacity)
Returns a new non-parameterized map of a particular sort with an initial capacity. |
|
abstract
|
setMap(Map<K1,V1> map)
A method to get a parameterized (genericized) map out. |
|
abstract
|
setMap(Map<K1,V1> map,
int initCapacity)
|
|
static
|
treeMapFactory()
Return a MapFactory that returns an TreeMap. |
|
static
|
weakHashMapFactory()
Return a MapFactory that returns a WeakHashMap. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final MapFactory HASH_MAP_FACTORY
public static final MapFactory IDENTITY_HASH_MAP_FACTORY
Method Detail |
---|
public static <K,V> MapFactory<K,V> hashMapFactory()
public static <K,V> MapFactory<K,V> identityHashMapFactory()
public static <K,V> MapFactory<K,V> weakHashMapFactory()
public static <K,V> MapFactory<K,V> treeMapFactory()
public static <K,V> MapFactory<K,V> linkedHashMapFactory()
public static <K,V> MapFactory<K,V> arrayMapFactory()
public abstract Map<K,V> newMap()
public abstract Map<K,V> newMap(int initCapacity)
initCapacity
- initial capacity of the map
public abstract <K1,V1> Map<K1,V1> setMap(Map<K1,V1> map)
map
- A type-parameterized Map
argument
Map
with type-parameterization identical to that of
the argument.public abstract <K1,V1> Map<K1,V1> setMap(Map<K1,V1> map, int initCapacity)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |