de.korelstar.util
Class MapSet

java.lang.Object
  extended by de.korelstar.util.MapSet

public class MapSet
extends java.lang.Object

Tool to manage a Map which values are Sets


Constructor Summary
MapSet()
           
 
Method Summary
 boolean add(java.lang.Object key, java.lang.Object value)
          Adds an Object to the Map
 boolean containsKey(java.lang.Object key)
          Checks, if a key has associated values
 boolean equals(java.lang.Object o)
           
 java.util.Set get(java.lang.Object key)
          Gets all edges with a certain key
 int hashCode()
           
 void remove(java.lang.Object key, java.lang.Object value)
          Removes an edge with the specified key
 java.lang.String toString()
           
 java.util.Set values()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapSet

public MapSet()
Method Detail

add

public boolean add(java.lang.Object key,
                   java.lang.Object value)
Adds an Object to the Map

Parameters:
key - the key, which is used to access the value
value - the value

get

public java.util.Set get(java.lang.Object key)
Gets all edges with a certain key

Parameters:
key - Node

containsKey

public boolean containsKey(java.lang.Object key)
Checks, if a key has associated values

Parameters:
key - the key

remove

public void remove(java.lang.Object key,
                   java.lang.Object value)
Removes an edge with the specified key

Parameters:
key - Key

values

public java.util.Set values()
Returns:
all saved edges

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object