|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractMap<K,V> java.util.HashMap<K,java.util.HashSet<V>> urv.util.graph.HashMapSet<K,V>
public class HashMapSet<K,V>
This class offers methods to store elements in a list placed into a Hashmap
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Constructor Summary | |
---|---|
HashMapSet()
|
Method Summary | |
---|---|
void |
addToSet(K key,
V value)
Adds a new value to the list of the specified key |
boolean |
existsInList(K key,
V value)
Checks whether the given value exists in the set of the given key |
java.util.HashSet<V> |
getSet(K key)
Returns the whole set from a given key |
void |
putSet(K key,
java.util.HashSet<V> value)
Adds a new set to the specified key |
void |
removeFromBothSets(K key1,
K key2)
Removes key1 from set key2 and viceversa |
void |
removeFromSet(K key,
V value)
Removes a value from the set of the specified key |
Methods inherited from class java.util.HashMap |
---|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public HashMapSet()
Method Detail |
---|
public void addToSet(K key, V value)
key
- value
- public boolean existsInList(K key, V value)
key
- value
-
public java.util.HashSet<V> getSet(K key)
key
-
public void putSet(K key, java.util.HashSet<V> value)
key
- value
- public void removeFromBothSets(K key1, K key2)
key1
- key2
- public void removeFromSet(K key, V value)
key
- value
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |