|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.vremanagement.resourcemanager.impl.resources.types.MultiKeysMap<K1,K2,V>
public class MultiKeysMap<K1,K2,V>
A thread-safe Map with multiple keys allowing multiple values per key
| Constructor Summary | |
|---|---|
MultiKeysMap()
|
|
| Method Summary | |
|---|---|
void |
clean()
Removes all mapping from this maps |
java.util.Set<V> |
getValuesByPrimaryKey(K1 key)
Returns the values to which this map maps the specified primary key |
java.util.Set<V> |
getValuesBySecondaryKey(K2 key)
Returns the values to which this map maps the specified primary key |
java.util.Iterator<V> |
iterator()
|
java.util.Set<K1> |
primaryKeySet()
Returns a set view of the primary keys contained in this map |
void |
put(K1 key1,
K2 key2,
V value)
Associates the specified value with the two keys |
void |
removeValue(V value)
removes the given values and its keys from the map |
void |
removeValuesByPrimaryKey(K1 key)
Removes all the values associated to the primary key |
void |
removeValuesBySecondaryKey(K2 key)
Removes all the values associated to the secondary key |
java.util.Set<K2> |
secondaryKeySet()
Returns a set view of the secondary keys contained in this map |
java.util.Collection<V> |
values()
Returns a collection view of the values contained in this map |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MultiKeysMap()
| Method Detail |
|---|
public java.util.Iterator<V> iterator()
iterator in interface java.lang.Iterable<V>
public void put(K1 key1,
K2 key2,
V value)
key1 - the value's primary keykey2 - the value's secondary keyvalue - the valuepublic void removeValue(V value)
value - public void removeValuesByPrimaryKey(K1 key)
key - the key of type K1public void removeValuesBySecondaryKey(K2 key)
key - the key of type K2public java.util.Set<V> getValuesByPrimaryKey(K1 key)
key - key whose associated values are to be returned
public java.util.Set<V> getValuesBySecondaryKey(K2 key)
key - key whose associated values are to be returned
public java.util.Set<K1> primaryKeySet()
public java.util.Set<K2> secondaryKeySet()
public java.util.Collection<V> values()
public void clean()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||