soot.toolkits.scalar
Class ArrayPackedSet

java.lang.Object
  extended by soot.toolkits.scalar.AbstractFlowSet
      extended by soot.toolkits.scalar.AbstractBoundedFlowSet
          extended by soot.toolkits.scalar.ArrayPackedSet
All Implemented Interfaces:
Iterable, BoundedFlowSet, FlowSet

public class ArrayPackedSet
extends AbstractBoundedFlowSet

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


Constructor Summary
ArrayPackedSet(FlowUniverse universe)
           
 
Method Summary
 void add(Object obj)
          Adds obj to this.
 void clear()
          implemented, but *very* inefficient.
 ArrayPackedSet clone()
          Clones the current FlowSet.
 void complement(FlowSet destFlow)
          Complements this BoundedFlowSet, putting the result into dest.
 boolean contains(Object obj)
          Returns true, if the object is in the set.
 void copy(FlowSet destFlow)
          Copies the current FlowSet into dest.
 void difference(FlowSet otherFlow, FlowSet destFlow)
          Returns the set difference (this intersect ~other) of this FlowSet and other, putting result into dest.
 Object emptySet()
          implemented, but inefficient.
 boolean equals(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(Object obj)
          Removes obj from this.
 int size()
          Returns the size of the current FlowSet.
 List toList()
          Returns an unbacked list of contained objects for this FlowSet.
 List toList(int low, int high)
           
 void union(FlowSet otherFlow, FlowSet destFlow)
          Returns the union (join) of this FlowSet and other, putting result into dest.
 
Methods inherited from class soot.toolkits.scalar.AbstractBoundedFlowSet
complement, topSet
 
Methods inherited from class soot.toolkits.scalar.AbstractFlowSet
add, difference, hashCode, intersection, iterator, remove, toString, union
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface soot.toolkits.scalar.FlowSet
add, difference, intersection, iterator, remove, union
 

Constructor Detail

ArrayPackedSet

public ArrayPackedSet(FlowUniverse universe)
Method Detail

clone

public ArrayPackedSet clone()
Description copied from interface: FlowSet
Clones the current FlowSet.

Specified by:
clone in interface FlowSet
Specified by:
clone in class AbstractFlowSet

emptySet

public Object emptySet()
Description copied from class: AbstractFlowSet
implemented, but inefficient.

Specified by:
emptySet in interface FlowSet
Overrides:
emptySet in class AbstractFlowSet

size

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

Specified by:
size in interface FlowSet
Specified by:
size in class AbstractFlowSet

isEmpty

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

Specified by:
isEmpty in interface FlowSet
Specified by:
isEmpty in class AbstractFlowSet

clear

public void clear()
Description copied from class: AbstractFlowSet
implemented, but *very* inefficient.

Specified by:
clear in interface FlowSet
Overrides:
clear in class AbstractFlowSet

toList

public List toList(int low,
                   int high)

toList

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

Specified by:
toList in interface FlowSet
Specified by:
toList in class AbstractFlowSet

add

public void add(Object obj)
Description copied from interface: FlowSet
Adds obj to this.

Specified by:
add in interface FlowSet
Specified by:
add in class AbstractFlowSet

complement

public void complement(FlowSet destFlow)
Description copied from interface: BoundedFlowSet
Complements this BoundedFlowSet, putting the result into dest. dest and this may be the same object.

Specified by:
complement in interface BoundedFlowSet
Overrides:
complement in class AbstractBoundedFlowSet

remove

public void remove(Object obj)
Description copied from interface: FlowSet
Removes obj from this.

Specified by:
remove in interface FlowSet
Specified by:
remove in class AbstractFlowSet

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. dest, other and this could be the same object.

Specified by:
union in interface FlowSet
Overrides:
union in class AbstractFlowSet

difference

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

Specified by:
difference in interface FlowSet
Overrides:
difference in class AbstractFlowSet

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. dest, other and this could be the same object.

Specified by:
intersection in interface FlowSet
Overrides:
intersection in class AbstractFlowSet

contains

public boolean contains(Object obj)
Returns true, if the object is in the set.

Specified by:
contains in interface FlowSet
Specified by:
contains in class AbstractFlowSet

equals

public boolean equals(Object otherFlow)
Overrides:
equals in class AbstractFlowSet

copy

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

Specified by:
copy in interface FlowSet
Overrides:
copy in class AbstractFlowSet