de.saar.chorus.domgraph.graph
Class NodeLabels

Object
  extended by NodeLabels

public class NodeLabels
extends Object

A map which is used for storing the node labels of a labelled dominance graph.

Author:
Alexander Koller

Constructor Summary
NodeLabels()
           
 
Method Summary
 void addLabel(String node, String label)
          Adds a label for a given node.
 void clear()
          Removes all node-label mappings from this map.
 boolean equals(Object obj)
           
 String getLabel(String node)
          Gets the label for a given node.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeLabels

public NodeLabels()
Method Detail

clear

public void clear()
Removes all node-label mappings from this map.


addLabel

public void addLabel(String node,
                     String label)
Adds a label for a given node.

Parameters:
node - the node
label - the label for this node

getLabel

public String getLabel(String node)
Gets the label for a given node. If the node was not assigned a label, returns null.

Parameters:
node - a node
Returns:
the label, or null if the node has no label

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object