|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.antlr.runtime.misc.DoubleKeyMap<Key1,Key2,Value>
public class DoubleKeyMap<Key1,Key2,Value>
Sometimes we need to map a key to a value but key is two pieces of data. This nested hash table saves creating a single key each time we access map; avoids mem creation.
Constructor Summary | |
---|---|
DoubleKeyMap()
|
Method Summary | |
---|---|
Map<Key2,Value> |
get(Key1 k1)
|
Value |
get(Key1 k1,
Key2 k2)
|
Set<Key1> |
keySet()
get all primary keys |
Set<Key2> |
keySet(Key1 k1)
get all secondary keys associated with a primary key |
Value |
put(Key1 k1,
Key2 k2,
Value v)
|
Collection<Value> |
values()
|
Collection<Value> |
values(Key1 k1)
Get all values associated with primary key |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DoubleKeyMap()
Method Detail |
---|
public Value put(Key1 k1, Key2 k2, Value v)
public Value get(Key1 k1, Key2 k2)
public Map<Key2,Value> get(Key1 k1)
public Collection<Value> values(Key1 k1)
public Set<Key1> keySet()
public Set<Key2> keySet(Key1 k1)
public Collection<Value> values()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |