soot.toolkits.scalar
Class ArrayPackedSet

java.lang.Object
  |
  +--soot.toolkits.scalar.ArrayPackedSet

public class ArrayPackedSet
extends java.lang.Object
implements BoundedFlowSet

Reference implementation for a BoundedFlowSet. Items are stored in an Array.


Constructor Summary
ArrayPackedSet(FlowUniverse universe)
           
 
Method Summary
 void add(java.lang.Object obj, FlowSet destFlow)
          Adds obj to dest.
 void clear()
          Sets this FlowSet to the empty set (more generally, the bottom element of the lattice.)
 java.lang.Object clone()
          Clones the current FlowSet.
 void complement(FlowSet destFlow)
          Complements this BoundedFlowSet, putting the result into dest.
 boolean contains(java.lang.Object obj)
          Returns true if this FlowSet contains obj.
 void copy(FlowSet destFlow)
          Copies the current FlowSet into dest.
 void difference(FlowSet otherFlow, FlowSet destFlow)
          Returns the set difference (this join ~other) of this FlowSet and other, putting result into dest.
 boolean equals(java.lang.Object otherFlow)
           
 void intersection(FlowSet otherFlow, FlowSet destFlow)
          Returns the intersection (meet) of this FlowSet and other, putting result into dest.
 boolean isEmpty()
          Returns true if this FlowSet is the empty set.
 void remove(java.lang.Object obj, FlowSet destFlow)
          Removes obj from dest.
 int size()
          Returns the size of the current FlowSet.
 java.util.List toList()
          Returns an unbacked list of contained objects for this FlowSet.
 java.util.List toList(int low, int high)
          Returns elements [low..high] of this BoundedFlowSet.
 java.lang.String toString()
           
 void union(FlowSet otherFlow, FlowSet destFlow)
          Returns the union (join) of this FlowSet and other, putting result into dest.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArrayPackedSet

public ArrayPackedSet(FlowUniverse universe)
Method Detail

clone

public java.lang.Object clone()
Description copied from interface: FlowSet
Clones the current FlowSet.
Overrides:
clone in class java.lang.Object

size

public int size()
Description copied from interface: FlowSet
Returns the size of the current FlowSet. (optional operation)

isEmpty

public boolean isEmpty()
Description copied from interface: FlowSet
Returns true if this FlowSet is the empty set.

clear

public void clear()
Description copied from interface: FlowSet
Sets this FlowSet to the empty set (more generally, the bottom element of the lattice.)

toList

public java.util.List toList(int low,
                             int high)
Description copied from interface: BoundedFlowSet
Returns elements [low..high] of this BoundedFlowSet. (optional operation)
Specified by:
toList in interface BoundedFlowSet

toList

public java.util.List toList()
Description copied from interface: FlowSet
Returns an unbacked list of contained objects for this FlowSet. (optional operation)

add

public void add(java.lang.Object obj,
                FlowSet destFlow)
Description copied from interface: FlowSet
Adds obj to dest. (optional operation)

complement

public void complement(FlowSet destFlow)
Description copied from interface: BoundedFlowSet
Complements this BoundedFlowSet, putting the result into dest.
Specified by:
complement in interface BoundedFlowSet

remove

public void remove(java.lang.Object obj,
                   FlowSet destFlow)
Description copied from interface: FlowSet
Removes obj from dest. (optional operation)

union

public void union(FlowSet otherFlow,
                  FlowSet destFlow)
Description copied from interface: FlowSet
Returns the union (join) of this FlowSet and other, putting result into dest.

difference

public void difference(FlowSet otherFlow,
                       FlowSet destFlow)
Description copied from interface: FlowSet
Returns the set difference (this join ~other) of this FlowSet and other, putting result into dest.

intersection

public void intersection(FlowSet otherFlow,
                         FlowSet destFlow)
Description copied from interface: FlowSet
Returns the intersection (meet) of this FlowSet and other, putting result into dest.

contains

public boolean contains(java.lang.Object obj)
Description copied from interface: FlowSet
Returns true if this FlowSet contains obj. (optional operation)

equals

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

toString

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

copy

public void copy(FlowSet destFlow)
Description copied from interface: FlowSet
Copies the current FlowSet into dest.