Package soot.toolkits.scalar
Class HashSparseSet<T>
- java.lang.Object
-
- soot.toolkits.scalar.AbstractFlowSet<T>
-
- soot.toolkits.scalar.HashSparseSet<T>
-
public class HashSparseSet<T> extends AbstractFlowSet<T>
Reference implementation for a FlowSet. Items are stored in an HashSet which is a more scalable version of ArraySparseSet.
-
-
Field Summary
Fields Modifier and Type Field Description protected LinkedHashSet<T>elements
-
Constructor Summary
Constructors Constructor Description HashSparseSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(T e)Addsobjtothis.voidclear()implemented, but *very* inefficient.HashSparseSet<T>clone()Clones the current FlowSet.booleancontains(Object obj)Returns true if this FlowSet containsobj.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.Iterator<T>iterator()returns an iterator over the elements of the flowSet.voidremove(int idx)voidremove(Object obj)Removesobjfromthis.intsize()Returns the size of the current FlowSet.List<T>toList()Returns a unbacked list of elements in this set.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.AbstractFlowSet
add, difference, hashCode, intersection, isSubSet, 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
copyFreshToExisting
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
elements
protected LinkedHashSet<T> elements
-
-
Method Detail
-
clone
public HashSparseSet<T> clone()
Description copied from interface:FlowSetClones the current FlowSet.
-
emptySet
public FlowSet<T> emptySet()
Description copied from class:AbstractFlowSetimplemented, but inefficient.
-
clear
public void clear()
Description copied from class:AbstractFlowSetimplemented, but *very* 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.
-
remove
public void remove(Object obj)
Description copied from interface:FlowSetRemovesobjfromthis.
-
remove
public void remove(int idx)
-
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.
-
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>
-
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>
-
contains
public boolean contains(Object obj)
Description copied from interface:FlowSetReturns true if this FlowSet containsobj.
-
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.
-
-