public final class BitVectorIntSet extends Object implements MutableIntSet
BitVector implementation of MutableIntSet.
Note that this is NOT a value with regard to hashCode and equals.
| Constructor and Description |
|---|
BitVectorIntSet() |
BitVectorIntSet(BitVector v) |
BitVectorIntSet(IntSet S) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(int i)
Add an integer value to this set.
|
boolean |
addAll(IntSet set)
Add all members of set to this.
|
boolean |
addAllInIntersection(IntSet other,
IntSet filter) |
void |
addAllOblivious(IntSet set)
this version of add all will likely be faster if the client doesn't care about the change or
the population count.
|
void |
clear()
remove all elements from this set
|
boolean |
contains(int i) |
boolean |
containsAll(BitVectorIntSet other) |
boolean |
containsAny(IntSet set) |
void |
copySet(IntSet set)
Set the value of this to be the same as the value of set
|
void |
foreach(IntSetAction action)
Invoke an action on each element of the Set
|
void |
foreachExcluding(IntSet X,
IntSetAction action)
Invoke an action on each element of the Set, excluding elements of Set X
|
BitVector |
getBitVector() |
BitVectorIntSet |
intersection(IntSet that)
This implementation must not despoil the original value of "this"
|
void |
intersectWith(IntSet set)
Intersect this with another set.
|
IntIterator |
intIterator()
Use with extreme care; doesn't detect ConcurrentModificationExceptions
|
boolean |
isEmpty() |
boolean |
isSubset(IntSet that) |
SparseIntSet |
makeSparseCopy() |
int |
max() |
int |
nextSetBit(int n) |
boolean |
remove(int i)
Remove an integer from this set.
|
boolean |
removeAll(BitVectorIntSet set) |
boolean |
sameValue(IntSet that) |
int |
size() |
SparseIntSet |
toSparseIntSet()
TODO: optimize
|
String |
toString() |
IntSet |
union(IntSet that)
This implementation must not despoil the original value of "this"
|
public BitVectorIntSet()
public BitVectorIntSet(BitVector v)
public BitVectorIntSet(IntSet S) throws IllegalArgumentException
IllegalArgumentExceptionpublic void clear()
MutableIntSetclear in interface MutableIntSetpublic void copySet(IntSet set) throws IllegalArgumentException
MutableIntSetcopySet in interface MutableIntSetIllegalArgumentExceptionpublic boolean addAll(IntSet set)
MutableIntSetaddAll in interface MutableIntSetpublic void addAllOblivious(IntSet set) throws IllegalArgumentException
IllegalArgumentException - if set == nullpublic boolean add(int i)
MutableIntSetadd in interface MutableIntSeti - integer to addpublic boolean remove(int i)
MutableIntSetremove in interface MutableIntSeti - integer to removepublic void intersectWith(IntSet set)
MutableIntSetintersectWith in interface MutableIntSetpublic BitVectorIntSet intersection(IntSet that)
IntSetintersection in interface IntSetIntSet.intersection(com.ibm.wala.util.intset.IntSet)public IntSet union(IntSet that)
IntSetunion in interface IntSetIntSet.union(com.ibm.wala.util.intset.IntSet)public boolean isEmpty()
isEmpty in interface IntSetIntSet.isEmpty()public int size()
size in interface IntSetIntSet.size()public IntIterator intIterator()
intIterator in interface IntSetpublic void foreach(IntSetAction action)
IntSetforeach in interface IntSetIntSet.foreach(com.ibm.wala.util.intset.IntSetAction)public SparseIntSet makeSparseCopy()
public void foreachExcluding(IntSet X, IntSetAction action)
IntSetforeachExcluding in interface IntSetIntSet.foreach(com.ibm.wala.util.intset.IntSetAction)public boolean contains(int i)
public int nextSetBit(int n)
public boolean sameValue(IntSet that) throws IllegalArgumentException, UnimplementedError
sameValue in interface IntSetthis has the same value as that.IllegalArgumentExceptionUnimplementedErrorIntSet.sameValue(com.ibm.wala.util.intset.IntSet)public boolean isSubset(IntSet that)
isSubset in interface IntSetthis is a subset of that.IntSet.isSubset(com.ibm.wala.util.intset.IntSet)public BitVector getBitVector()
public SparseIntSet toSparseIntSet()
public boolean removeAll(BitVectorIntSet set)
IllegalArgumentException - if set is nullpublic boolean containsAny(IntSet set) throws IllegalArgumentException
containsAny in interface IntSetIllegalArgumentExceptionIntSet.containsAny(com.ibm.wala.util.intset.IntSet)public boolean addAllInIntersection(IntSet other, IntSet filter) throws IllegalArgumentException
addAllInIntersection in interface MutableIntSetIllegalArgumentExceptionpublic boolean containsAll(BitVectorIntSet other)