Package org.apache.flink.runtime.util
Class DualKeyLinkedMap<A,B,V>
- java.lang.Object
-
- org.apache.flink.runtime.util.DualKeyLinkedMap<A,B,V>
-
- Type Parameters:
A
- Type of key A. Key A is the primary key.B
- Type of key B. Key B is the secondary key.V
- Type of the value
public class DualKeyLinkedMap<A,B,V> extends Object
Map which stores values under two different indices. The mapping of the primary key to the value is backed byLinkedHashMap
so that the iteration order over the values and the primary key set is the insertion order. Note that the insertion order is not affected if a primary key is re-inserted into the map. Also note that there is no contract of the iteration order over the secondary key set.
-
-
Constructor Summary
Constructors Constructor Description DualKeyLinkedMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKeyA(A aKey)
boolean
containsKeyB(B bKey)
A
getKeyAByKeyB(B bKey)
B
getKeyBByKeyA(A aKey)
V
getValueByKeyA(A aKey)
V
getValueByKeyB(B bKey)
Set<A>
keySetA()
Set<B>
keySetB()
V
put(A aKey, B bKey, V value)
V
removeKeyA(A aKey)
V
removeKeyB(B bKey)
int
size()
Collection<V>
values()
-
-
-
Method Detail
-
size
public int size()
-
containsKeyA
public boolean containsKeyA(A aKey)
-
containsKeyB
public boolean containsKeyB(B bKey)
-
values
public Collection<V> values()
-
clear
public void clear()
-
-