public class BimodalMutableIntSet extends Object implements MutableIntSet
MutableIntSet that delegates to either a MutableSparseIntSet
or a BitVectorIntSet| Constructor and Description |
|---|
BimodalMutableIntSet() |
BimodalMutableIntSet(BimodalMutableIntSet x) |
BimodalMutableIntSet(int initialSize,
float expansionFactor) |
| 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 |
clear()
remove all elements from this set
|
boolean |
contains(int i) |
boolean |
containsAll(BimodalMutableIntSet that)
TODO: optimize ME!
|
boolean |
containsAny(IntSet that) |
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
|
IntSet |
getBackingStore()
use with care
|
IntSet |
intersection(IntSet that)
This implementation must not despoil the original value of "this"
|
void |
intersectWith(IntSet set)
Intersect this with another set.
|
IntIterator |
intIterator() |
boolean |
isEmpty() |
boolean |
isSubset(IntSet that) |
static BimodalMutableIntSet |
makeCopy(IntSet B) |
int |
max() |
boolean |
remove(int i)
Remove an integer from this set.
|
boolean |
removeAll(IntSet that)
TODO: optimize ME!
|
boolean |
sameValue(IntSet that) |
int |
size() |
String |
toString() |
IntSet |
union(IntSet that)
This implementation must not despoil the original value of "this"
|
public BimodalMutableIntSet()
public BimodalMutableIntSet(int initialSize,
float expansionFactor)
public BimodalMutableIntSet(BimodalMutableIntSet x)
IllegalArgumentException - if x is nullpublic void copySet(IntSet set)
MutableIntSetcopySet in interface MutableIntSetpublic boolean addAll(IntSet set)
MutableIntSetaddAll in interface MutableIntSetpublic boolean addAllInIntersection(IntSet other, IntSet filter)
addAllInIntersection in interface MutableIntSetpublic 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) throws UnimplementedError
MutableIntSetintersectWith in interface MutableIntSetUnimplementedErrorpublic boolean contains(int i)
public IntSet intersection(IntSet that) throws UnimplementedError
IntSetintersection in interface IntSetUnimplementedErrorpublic IntSet union(IntSet that)
IntSetpublic boolean isEmpty()
public int size()
public IntIterator intIterator()
intIterator in interface IntSetpublic void foreach(IntSetAction action)
IntSetpublic void foreachExcluding(IntSet X, IntSetAction action)
IntSetforeachExcluding in interface IntSetpublic int max()
throws IllegalStateException
max in interface IntSetIllegalStateExceptionpublic static BimodalMutableIntSet makeCopy(IntSet B) throws UnimplementedError, IllegalArgumentException
public void clear()
MutableIntSetclear in interface MutableIntSetpublic boolean sameValue(IntSet that)
public boolean isSubset(IntSet that) throws IllegalArgumentException
isSubset in interface IntSetthis is a subset of that.IllegalArgumentExceptionpublic IntSet getBackingStore()
public boolean containsAny(IntSet that) throws IllegalArgumentException, UnimplementedError
containsAny in interface IntSetIllegalArgumentExceptionUnimplementedErrorpublic boolean removeAll(IntSet that)
IllegalArgumentException - if that is nullpublic boolean containsAll(BimodalMutableIntSet that)
IllegalArgumentException - if that is null