Package org.antlr.v4.runtime.misc
Class DoubleKeyMap<Key1,Key2,Value>
- java.lang.Object
-
- org.antlr.v4.runtime.misc.DoubleKeyMap<Key1,Key2,Value>
-
public class DoubleKeyMap<Key1,Key2,Value> extends Object
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
Constructors Constructor Description DoubleKeyMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<Key2,Value>
get(Key1 k1)
Value
get(Key1 k1, Key2 k2)
Set<Key1>
keySet()
get all primary keysSet<Key2>
keySet(Key1 k1)
get all secondary keys associated with a primary keyValue
put(Key1 k1, Key2 k2, Value v)
Collection<Value>
values(Key1 k1)
Get all values associated with primary key
-
-
-
Method Detail
-
values
public Collection<Value> values(Key1 k1)
Get all values associated with primary key
-
-