net.sourceforge.jaulp.collections
Interface KeySetMap<K,V>

All Known Implementing Classes:
DefaultKeySetMap

public interface KeySetMap<K,V>

The Interface KeySetMap. It wrappes a Map with a key and values. The values are Sets. So you can put in one key more unique values.


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.
 

Method Detail

add

void add(K key,
         V value)
Adds the value in the Set from the key.

Parameters:
key - the key
value - the value

add

void add(java.util.Map<? extends K,? extends java.util.Set<V>> keyListMap)
Adds a Map to the main Map.

Parameters:
keyListMap - the key list map

containsKey

boolean containsKey(K key)
Contains key.

Parameters:
key - the key
Returns:
true, if successful

get

java.util.Set<V> get(K key)
Gets the Set with the values from the given key.

Parameters:
key - the key
Returns:
the set< v>

getKeys

java.util.Set<K> getKeys()
Gets the keys.

Returns:
the keys

getSize

int getSize()
Gets the size.

Returns:
the size

isEmpty

boolean isEmpty()
Checks if is empty.

Returns:
true, if is empty

remove

java.util.Set<V> remove(K key)
Removes the Set from the given key.

Parameters:
key - the key
Returns:
the set< v>

removeAll

void removeAll(java.util.Collection<K> keys)
Removes all keys from the Map from the given Collection.

Parameters:
keys - the keys


Copyright © 2010. All Rights Reserved.