dk.brics.string.flow
Class Use

java.lang.Object
  extended by dk.brics.string.flow.Use

public class Use
extends Object

Set of incoming flow edges. Has references to all corresponding definitions.


Constructor Summary
Use(Node user)
          Constructs a bew use.
 
Method Summary
 void addDef(Node def)
          Adds definition node to this use.
 void addDefUse(Node def)
          Adds definition node to this use and vice versa.
 void clearDefs()
          Clears the set of definitions.
 boolean equalDefs(Use u)
          Checks whether this and the given use have the same definition nodes.
 Collection<Node> getDefs()
          Returns (unmodifiable) collection of definition nodes for this use.
 int getDefsHashCode()
          Returns hashcode for the definition nodes for this use.
 Node getUser()
          Returns user node for this use.
 void removeDef(Node def)
          Removes definition node from this use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Use

public Use(Node user)
Constructs a bew use.

Method Detail

addDef

public void addDef(Node def)
Adds definition node to this use.


addDefUse

public void addDefUse(Node def)
Adds definition node to this use and vice versa. Should be invoked if there is a possible flow from the given definition to this use.


clearDefs

public void clearDefs()
Clears the set of definitions.


equalDefs

public boolean equalDefs(Use u)
Checks whether this and the given use have the same definition nodes.


getDefs

public Collection<Node> getDefs()
Returns (unmodifiable) collection of definition nodes for this use. The result is sorted if in test mode.


getDefsHashCode

public int getDefsHashCode()
Returns hashcode for the definition nodes for this use.


getUser

public Node getUser()
Returns user node for this use.


removeDef

public void removeDef(Node def)
Removes definition node from this use.



Copyright © 2003-2009 Anders Møller, Aske Simon Christensen, Asger Feldthaus.