Package soot.toolkits.scalar
Class ArrayPackedSet<T>
- java.lang.Object
-
- soot.toolkits.scalar.AbstractFlowSet<T>
-
- soot.toolkits.scalar.AbstractBoundedFlowSet<T>
-
- soot.toolkits.scalar.ArrayPackedSet<T>
-
- All Implemented Interfaces:
Iterable<T>,BoundedFlowSet<T>,FlowSet<T>
public class ArrayPackedSet<T> extends AbstractBoundedFlowSet<T>
Reference implementation for a BoundedFlowSet. Items are stored in an Array.
-
-
Field Summary
Fields Modifier and Type Field Description protected BitSetbitsprotected ObjectIntMapper<T>map
-
Constructor Summary
Constructors Constructor Description ArrayPackedSet(FlowUniverse<T> universe)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(T obj)Addsobjtothis.voidclear()implemented, but *very* inefficient.ArrayPackedSet<T>clone()Clones the current FlowSet.voidcomplement(FlowSet<T> destFlow)Complements this BoundedFlowSet, putting the result intodest.booleancontains(T obj)Returns true, if the object is in the set.voidcopy(FlowSet<T> destFlow)Copies the current FlowSet into dest.voiddifference(FlowSet<T> otherFlow, FlowSet<T> destFlow)Returns the set difference (this intersect ~other) of this FlowSet andother, putting result intodest.FlowSet<T>emptySet()implemented, but inefficient.booleanequals(Object otherFlow)voidintersection(FlowSet<T> otherFlow, FlowSet<T> destFlow)Returns the intersection (meet) of this FlowSet andother, putting result intodest.booleanisEmpty()Returns true if this FlowSet is the empty set.booleanisSubSet(FlowSet<T> other)Returns true if theotherFlowSet is a subset ofthisFlowSet.Iterator<T>iterator()returns an iterator over the elements of the flowSet.voidremove(T obj)Removesobjfromthis.intsize()Returns the size of the current FlowSet.List<T>toList()Returns an unbacked list of contained objects for this FlowSet.List<T>toList(int lowInclusive, int highInclusive)voidunion(FlowSet<T> otherFlow, FlowSet<T> destFlow)Returns the union (join) of this FlowSet andother, putting result intodest.-
Methods inherited from class soot.toolkits.scalar.AbstractBoundedFlowSet
complement, topSet
-
Methods inherited from class soot.toolkits.scalar.AbstractFlowSet
add, difference, hashCode, intersection, 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, copyFreshToExisting, difference, intersection, remove, union
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
map
protected final ObjectIntMapper<T> map
-
bits
protected final BitSet bits
-
-
Constructor Detail
-
ArrayPackedSet
public ArrayPackedSet(FlowUniverse<T> universe)
-
-
Method Detail
-
clone
public ArrayPackedSet<T> clone()
Description copied from interface:FlowSetClones the current FlowSet.
-
emptySet
public FlowSet<T> emptySet()
Description copied from class:AbstractFlowSetimplemented, but inefficient.
-
size
public int size()
Description copied from interface:FlowSetReturns the size of the current FlowSet.
-
isEmpty
public boolean isEmpty()
Description copied from interface:FlowSetReturns true if this FlowSet is the empty set.
-
clear
public void clear()
Description copied from class:AbstractFlowSetimplemented, but *very* inefficient.
-
toList
public List<T> toList()
Description copied from interface:FlowSetReturns an unbacked list of contained objects for this FlowSet.
-
complement
public void complement(FlowSet<T> destFlow)
Description copied from interface:BoundedFlowSetComplements this BoundedFlowSet, putting the result intodest.destandthismay be the same object.- Specified by:
complementin interfaceBoundedFlowSet<T>- Overrides:
complementin classAbstractBoundedFlowSet<T>
-
isSubSet
public boolean isSubSet(FlowSet<T> other)
Description copied from interface:FlowSetReturns true if theotherFlowSet is a subset ofthisFlowSet.
-
union
public void union(FlowSet<T> otherFlow, FlowSet<T> destFlow)
Description copied from interface:FlowSetReturns the union (join) of this FlowSet andother, putting result intodest.dest,otherandthiscould be the same object.
-
difference
public void difference(FlowSet<T> otherFlow, FlowSet<T> destFlow)
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>- Overrides:
differencein classAbstractFlowSet<T>
-
intersection
public void intersection(FlowSet<T> otherFlow, FlowSet<T> destFlow)
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>- Overrides:
intersectionin classAbstractFlowSet<T>
-
contains
public boolean contains(T obj)
Returns true, if the object is in the set.
-
equals
public boolean equals(Object otherFlow)
- Overrides:
equalsin classAbstractFlowSet<T>
-
copy
public void copy(FlowSet<T> destFlow)
Description copied from interface:FlowSetCopies the current FlowSet into dest.
-
-