|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jaulp.collections.DefaultKeySetMap<K,V>
public class DefaultKeySetMap<K,V>
The Class DefaultKeySetMap is the default implematation from the inteface KeySetMap. It wrappes a Map with a key and values. The values are Sets. So you can put in one key more unique values.
Constructor Summary | |
---|---|
DefaultKeySetMap()
|
Method Summary | |
---|---|
void |
add(K key,
V value)
Adds the value in the Set from the key. |
void |
add(java.util.Map<? extends K,? extends java.util.Set<V>> keyListMap)
Adds a Map to the main Map. |
boolean |
containsKey(K key)
Contains key. |
java.util.Set<V> |
get(K key)
Gets the Set with the values from the given key. |
java.util.Set<K> |
getKeys()
Gets the keys. |
int |
getSize()
Gets the size. |
boolean |
isEmpty()
Checks if is empty. |
java.util.Set<V> |
remove(K key)
Removes the Set from the given key. |
void |
removeAll(java.util.Collection<K> keys)
Removes all keys from the Map from the given Collection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultKeySetMap()
Method Detail |
---|
public void add(K key, V value)
add
in interface KeySetMap<K,V>
key
- the keyvalue
- the valueKeySetMap.add(Object, Object)
public void add(java.util.Map<? extends K,? extends java.util.Set<V>> keyListMap)
add
in interface KeySetMap<K,V>
keyListMap
- the key list mapKeySetMap.add(java.util.Map)
public boolean containsKey(K key)
containsKey
in interface KeySetMap<K,V>
key
- the key
KeySetMap.containsKey(Object)
public java.util.Set<V> get(K key)
get
in interface KeySetMap<K,V>
key
- the key
KeySetMap.get(Object)
public java.util.Set<K> getKeys()
getKeys
in interface KeySetMap<K,V>
KeySetMap.getKeys()
public int getSize()
getSize
in interface KeySetMap<K,V>
KeySetMap.getSize()
public boolean isEmpty()
isEmpty
in interface KeySetMap<K,V>
KeySetMap.isEmpty()
public java.util.Set<V> remove(K key)
remove
in interface KeySetMap<K,V>
key
- the key
KeySetMap.remove(Object)
public void removeAll(java.util.Collection<K> keys)
removeAll
in interface KeySetMap<K,V>
keys
- the keysKeySetMap.removeAll(java.util.Collection)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |