Class MutableSharedBitVectorIntSet
java.lang.Object
com.ibm.wala.util.intset.MutableSharedBitVectorIntSet
- All Implemented Interfaces:
IntSet, MutableIntSet, Serializable
The shared bit vector implementation described by [Heintze 1999] TODO: much optimization
possible.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(int i) Add an integer value to this set.booleanAdd all members of set to this.booleanaddAllInIntersection(IntSet other, IntSet filter) voidclear()remove all elements from this setbooleancontains(int i) booleancontainsAny(IntSet set) voidSet the value of this to be the same as the value of setvoidforeach(IntSetAction action) Invoke an action on each element of the SetvoidforeachExcluding(IntSet X, IntSetAction action) Invoke an action on each element of the Set, excluding elements of Set Xbooleanintersection(IntSet that) This implementation must not despoil the original value of "this"voidintersectWith(IntSet set) Intersect this with another set.booleanisEmpty()booleanintmax()booleanremove(int i) Remove an integer from this set.static booleanbooleanintsize()toString()This implementation must not despoil the original value of "this"
-
Constructor Details
-
MutableSharedBitVectorIntSet
public MutableSharedBitVectorIntSet() -
MutableSharedBitVectorIntSet
- Throws:
IllegalArgumentException- if s is null
-
MutableSharedBitVectorIntSet
- Throws:
IllegalArgumentException- if s is null
-
-
Method Details
-
contains
-
intersection
Description copied from interface:IntSetThis implementation must not despoil the original value of "this"- Specified by:
intersectionin interfaceIntSet- Returns:
- a new IntSet which is the intersection of this and that
- See Also:
-
union
-
isEmpty
-
size
-
intIterator
- Specified by:
intIteratorin interfaceIntSet- Returns:
- a perhaps more efficient iterator
- See Also:
-
foreach
Description copied from interface:IntSetInvoke an action on each element of the Set -
foreachExcluding
Description copied from interface:IntSetInvoke an action on each element of the Set, excluding elements of Set X- Specified by:
foreachExcludingin interfaceIntSet- See Also:
-
max
-
sameValue
- Specified by:
sameValuein interfaceIntSet- Returns:
- true iff
thishas the same value asthat. - Throws:
IllegalArgumentExceptionUnimplementedError- See Also:
-
isSubset
-
copySet
Description copied from interface:MutableIntSetSet the value of this to be the same as the value of set- Specified by:
copySetin interfaceMutableIntSet
-
addAll
Description copied from interface:MutableIntSetAdd all members of set to this.- Specified by:
addAllin interfaceMutableIntSet- Returns:
- true iff the value of this changes.
- Throws:
IllegalArgumentException
-
add
public boolean add(int i) Description copied from interface:MutableIntSetAdd an integer value to this set.- Specified by:
addin interfaceMutableIntSet- Parameters:
i- integer to add- Returns:
- true iff the value of this changes.
-
remove
public boolean remove(int i) Description copied from interface:MutableIntSetRemove an integer from this set.- Specified by:
removein interfaceMutableIntSet- Parameters:
i- integer to remove- Returns:
- true iff the value of this changes.
-
intersectWith
Description copied from interface:MutableIntSetIntersect this with another set.- Specified by:
intersectWithin interfaceMutableIntSet
-
toString
-
containsAny
- Specified by:
containsAnyin interfaceIntSet- Returns:
- true iff this set contains integer i
- See Also:
-
addAllInIntersection
- Specified by:
addAllInIntersectionin interfaceMutableIntSet
-
clear
public void clear()Description copied from interface:MutableIntSetremove all elements from this set- Specified by:
clearin interfaceMutableIntSet
-