soot.toolkits.scalar
Class ArraySparseSet

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

public class ArraySparseSet
extends java.lang.Object
implements FlowSet

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


Constructor Summary
ArraySparseSet()
           
 
Method Summary
 void add(java.lang.Object e)
           
 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.
 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.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

ArraySparseSet

public ArraySparseSet()
Method Detail

clone

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

clear

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

size

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

isEmpty

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

toList

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

add

public void add(java.lang.Object e)

add

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

remove

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

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.
Specified by:
union in interface FlowSet

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.
Specified by:
intersection in interface FlowSet

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.
Specified by:
difference in interface FlowSet

contains

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

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.
Specified by:
copy in interface FlowSet