Class SemiSparseMutableIntSet
java.lang.Object
com.ibm.wala.util.intset.SemiSparseMutableIntSet
- All Implemented Interfaces:
IntSet, MutableIntSet, Serializable
- 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 setstatic SemiSparseMutableIntSetvoidforeach(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 Xintersection(IntSet that) This implementation must not despoil the original value of "this"voidintersectWith(IntSet set) Interset this with another set.booleanisEmpty()booleanintmax()booleanremove(int i) Remove an integer from this set.booleanintsize()toString()This implementation must not despoil the original value of "this"
-
Constructor Details
-
SemiSparseMutableIntSet
public SemiSparseMutableIntSet() -
SemiSparseMutableIntSet
- Throws:
IllegalArgumentException
-
-
Method Details
-
clear
public void clear()Description copied from interface:MutableIntSetremove all elements from this set- Specified by:
clearin interfaceMutableIntSet
-
contains
-
containsAny
- Specified by:
containsAnyin interfaceIntSet- Returns:
- true iff this set contains integer i
-
intersection
This 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
-
union
-
isEmpty
-
size
-
intIterator
- Specified by:
intIteratorin interfaceIntSet- Returns:
- a perhaps more efficient iterator
-
foreach
Invoke an action on each element of the Set -
foreachExcluding
Invoke an action on each element of the Set, excluding elements of Set X- Specified by:
foreachExcludingin interfaceIntSet
-
max
- Specified by:
maxin interfaceIntSet- Returns:
- maximum integer in this set.
- Throws:
IllegalStateException
-
sameValue
- Specified by:
sameValuein interfaceIntSet- Returns:
- true iff
thishas the same value asthat. - Throws:
IllegalArgumentException- if that is null
-
isSubset
- Specified by:
isSubsetin interfaceIntSet- Returns:
- true iff
thisis a subset ofthat. - Throws:
IllegalArgumentException- if that is null
-
copySet
Set the value of this to be the same as the value of set- Specified by:
copySetin interfaceMutableIntSet- Throws:
IllegalArgumentException- if set == null
-
addAll
Add all members of set to this.- Specified by:
addAllin interfaceMutableIntSet- Returns:
- true iff the value of this changes.
- Throws:
IllegalArgumentException- if set == null
-
add
public boolean add(int i) Add 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) Remove an integer from this set.- Specified by:
removein interfaceMutableIntSet- Parameters:
i- integer to remove- Returns:
- true iff the value of this changes.
-
intersectWith
Interset this with another set.- Specified by:
intersectWithin interfaceMutableIntSet
-
addAllInIntersection
- Specified by:
addAllInIntersectionin interfaceMutableIntSet- Throws:
IllegalArgumentException- if other is null
-
toString
-
removeAll
-
diff
-