|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.stanford.nlp.util.Maps
public class Maps
Utilities for Maps, including inverting, composing, and support for list/set values.
| Constructor Summary | |
|---|---|
Maps()
|
|
| Method Summary | |
|---|---|
static Map |
compose(Map map1,
Map map2)
Compose two maps map1:x->y and map2:y->z to get a map x->z |
static Map |
invert(Map map)
Inverts a map x->y to a map y->x assuming unique preimages. |
static Map |
invertSet(Map map)
Inverts a map x->y to a map y->pow(x) not assuming unique preimages. |
static void |
main(String[] args)
|
static void |
putIntoValueArrayList(Map map,
Object key,
Object value)
Adds the value to the ArrayList given by map.get(key), creating a new ArrayList if needed. |
static void |
putIntoValueCollection(Map map,
Object key,
Object value,
CollectionFactory cf)
Adds the value to the collection given by map.get(key). |
static void |
putIntoValueHashSet(Map map,
Object key,
Object value)
Adds the value to the HashSet given by map.get(key), creating a new HashMap if needed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Maps()
| Method Detail |
|---|
public static void putIntoValueHashSet(Map map,
Object key,
Object value)
map - key - value -
public static void putIntoValueArrayList(Map map,
Object key,
Object value)
map - key - value -
public static void putIntoValueCollection(Map map,
Object key,
Object value,
CollectionFactory cf)
map - key - value - cf -
public static Map compose(Map map1,
Map map2)
map1 - map2 -
public static Map invert(Map map)
map -
public static Map invertSet(Map map)
map -
public static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||