Package soot.toolkits.scalar
Class AbstractFlowSet<T>
- java.lang.Object
-
- soot.toolkits.scalar.AbstractFlowSet<T>
-
- Direct Known Subclasses:
AbstractBoundedFlowSet,ArraySparseSet,DavaFlowSet,HashSparseSet,ToppedSet
public abstract class AbstractFlowSet<T> extends Object implements FlowSet<T>
provides functional code for most of the methods. Subclasses are invited to provide a more efficient version. Most often this will be done in the following way:
public void yyy(FlowSet dest) { if (dest instanceof xxx) { blahblah; } else super.yyy(dest) }
-
-
Constructor Summary
Constructors Constructor Description AbstractFlowSet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidadd(T obj)Addsobjtothis.voidadd(T obj, FlowSet<T> dest)putsthisunionobjintodest.voidclear()implemented, but *very* inefficient.abstract AbstractFlowSet<T>clone()Clones the current FlowSet.abstract booleancontains(T obj)Returns true if this FlowSet containsobj.voidcopy(FlowSet<T> dest)Copies the current FlowSet into dest.voiddifference(FlowSet<T> other)Returns the set difference (this intersect ~other) of this FlowSet andother, putting result intothis.voiddifference(FlowSet<T> other, FlowSet<T> dest)Returns the set difference (this intersect ~other) of this FlowSet andother, putting result intodest.FlowSet<T>emptySet()implemented, but inefficient.booleanequals(Object o)inthashCode()voidintersection(FlowSet<T> other)Returns the intersection (meet) of this FlowSet andother, putting result intothis.voidintersection(FlowSet<T> other, FlowSet<T> dest)Returns the intersection (meet) of this FlowSet andother, putting result intodest.abstract booleanisEmpty()Returns true if this FlowSet is the empty set.booleanisSubSet(FlowSet<T> other)Returns true if theotherFlowSet is a subset ofthisFlowSet.abstract Iterator<T>iterator()returns an iterator over the elements of the flowSet.abstract voidremove(T obj)Removesobjfromthis.voidremove(T obj, FlowSet<T> dest)Putsthisminusobjintodest.abstract intsize()Returns the size of the current FlowSet.abstract List<T>toList()Returns an unbacked list of contained objects for this FlowSet.StringtoString()voidunion(FlowSet<T> other)Returns the union (join) of this FlowSet andother, putting result intothis.voidunion(FlowSet<T> other, FlowSet<T> dest)Returns the union (join) of this FlowSet andother, putting result intodest.-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface soot.toolkits.scalar.FlowSet
copyFreshToExisting
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
clone
public abstract AbstractFlowSet<T> clone()
Description copied from interface:FlowSetClones the current FlowSet.
-
copy
public void copy(FlowSet<T> dest)
Description copied from interface:FlowSetCopies the current FlowSet into dest.
-
clear
public void clear()
implemented, but *very* inefficient.
-
union
public void union(FlowSet<T> other)
Description copied from interface:FlowSetReturns the union (join) of this FlowSet andother, putting result intothis.
-
union
public void union(FlowSet<T> other, FlowSet<T> dest)
Description copied from interface:FlowSetReturns the union (join) of this FlowSet andother, putting result intodest.dest,otherandthiscould be the same object.
-
intersection
public void intersection(FlowSet<T> other)
Description copied from interface:FlowSetReturns the intersection (meet) of this FlowSet andother, putting result intothis.- Specified by:
intersectionin interfaceFlowSet<T>
-
intersection
public void intersection(FlowSet<T> other, FlowSet<T> dest)
Description copied from interface:FlowSetReturns the intersection (meet) of this FlowSet andother, putting result intodest.dest,otherandthiscould be the same object.- Specified by:
intersectionin interfaceFlowSet<T>
-
difference
public void difference(FlowSet<T> other)
Description copied from interface:FlowSetReturns the set difference (this intersect ~other) of this FlowSet andother, putting result intothis.- Specified by:
differencein interfaceFlowSet<T>
-
difference
public void difference(FlowSet<T> other, FlowSet<T> dest)
Description copied from interface:FlowSetReturns the set difference (this intersect ~other) of this FlowSet andother, putting result intodest.dest,otherandthiscould be the same object.- Specified by:
differencein interfaceFlowSet<T>
-
isEmpty
public abstract boolean isEmpty()
Description copied from interface:FlowSetReturns true if this FlowSet is the empty set.
-
size
public abstract int size()
Description copied from interface:FlowSetReturns the size of the current FlowSet.
-
add
public void add(T obj, FlowSet<T> dest)
Description copied from interface:FlowSetputsthisunionobjintodest.
-
remove
public abstract void remove(T obj)
Description copied from interface:FlowSetRemovesobjfromthis.
-
remove
public void remove(T obj, FlowSet<T> dest)
Description copied from interface:FlowSetPutsthisminusobjintodest.
-
isSubSet
public boolean isSubSet(FlowSet<T> other)
Description copied from interface:FlowSetReturns true if theotherFlowSet is a subset ofthisFlowSet.
-
contains
public abstract boolean contains(T obj)
Description copied from interface:FlowSetReturns true if this FlowSet containsobj.
-
iterator
public abstract Iterator<T> iterator()
Description copied from interface:FlowSetreturns an iterator over the elements of the flowSet. Note that the iterator might be backed, and hence be faster in the creation, than doingtoList().iterator().
-
toList
public abstract List<T> toList()
Description copied from interface:FlowSetReturns an unbacked list of contained objects for this FlowSet.
-
-