Class SemiSparseMutableIntSet
java.lang.Object
com.ibm.wala.util.intset.SemiSparseMutableIntSet
-
Constructor Summary
ConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(int i) Add an integer value to this set.boolean
Add all members of set to this.boolean
addAllInIntersection
(IntSet other, IntSet filter) void
clear()
remove all elements from this setboolean
contains
(int i) boolean
containsAny
(IntSet set) void
Set the value of this to be the same as the value of setstatic SemiSparseMutableIntSet
void
foreach
(IntSetAction action) Invoke an action on each element of the Setvoid
foreachExcluding
(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"void
intersectWith
(IntSet set) Interset this with another set.boolean
isEmpty()
boolean
int
max()
boolean
remove
(int i) Remove an integer from this set.boolean
int
size()
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:MutableIntSet
remove all elements from this set- Specified by:
clear
in interfaceMutableIntSet
-
contains
-
containsAny
- Specified by:
containsAny
in interfaceIntSet
- Returns:
- true iff this set contains integer i
-
intersection
This implementation must not despoil the original value of "this"- Specified by:
intersection
in interfaceIntSet
- Returns:
- a new IntSet which is the intersection of this and that
-
union
-
isEmpty
-
size
-
intIterator
- Specified by:
intIterator
in 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:
foreachExcluding
in interfaceIntSet
-
max
- Specified by:
max
in interfaceIntSet
- Returns:
- maximum integer in this set.
- Throws:
IllegalStateException
-
sameValue
- Specified by:
sameValue
in interfaceIntSet
- Returns:
- true iff
this
has the same value asthat
. - Throws:
IllegalArgumentException
- if that is null
-
isSubset
- Specified by:
isSubset
in interfaceIntSet
- Returns:
- true iff
this
is 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:
copySet
in interfaceMutableIntSet
- Throws:
IllegalArgumentException
- if set == null
-
addAll
Add all members of set to this.- Specified by:
addAll
in 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:
add
in 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:
remove
in interfaceMutableIntSet
- Parameters:
i
- integer to remove- Returns:
- true iff the value of this changes.
-
intersectWith
Interset this with another set.- Specified by:
intersectWith
in interfaceMutableIntSet
-
addAllInIntersection
- Specified by:
addAllInIntersection
in interfaceMutableIntSet
- Throws:
IllegalArgumentException
- if other is null
-
toString
-
removeAll
-
diff
-