public class MutableSparseIntSet extends SparseIntSet implements MutableIntSet, Serializable
elements, size
Modifier | Constructor and Description |
---|---|
protected |
MutableSparseIntSet() |
protected |
MutableSparseIntSet(int[] backingStore) |
protected |
MutableSparseIntSet(IntSet set) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(int value)
Add an integer value to this set.
|
boolean |
addAll(IntSet set)
Add all elements from another int set.
|
boolean |
addAll(SparseIntSet that)
Add all elements from another int set.
|
boolean |
addAllInIntersection(IntSet other,
IntSet filter) |
void |
clear()
remove all elements from this set
|
void |
copySet(IntSet that)
Set the value of this to be the same as the value of set
|
static MutableSparseIntSet |
createMutableSparseIntSet(int initialCapacity) |
static MutableSparseIntSet |
diff(MutableSparseIntSet A,
MutableSparseIntSet B) |
float |
getExpansionFactor() |
int |
getInitialNonEmptySize() |
void |
intersectWith(IntSet set)
Intersect this with another set.
|
void |
intersectWith(SparseIntSet set) |
static MutableSparseIntSet |
make(IntSet set) |
static MutableSparseIntSet |
makeEmpty() |
boolean |
remove(int value)
Remove an integer from this set.
|
void |
removeAll(BitVectorIntSet v) |
void |
removeAll(MutableSparseIntSet set)
TODO optimize
|
<T extends BitVectorBase<T>> |
removeAll(T v) |
add, contains, containsAny, containsAny, diff, diffInternal, elementAt, foreach, foreachExcluding, getIndex, intersection, intIterator, isEmpty, isSubset, max, pair, parseIntArray, sameValue, singleton, size, toIntArray, toString, union
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
contains, containsAny, foreach, foreachExcluding, intersection, intIterator, isEmpty, isSubset, max, sameValue, size, union
protected MutableSparseIntSet(IntSet set)
protected MutableSparseIntSet(int[] backingStore)
protected MutableSparseIntSet()
public void clear()
MutableIntSet
clear
in interface MutableIntSet
public boolean remove(int value)
MutableIntSet
remove
in interface MutableIntSet
value
- integer to removepublic int getInitialNonEmptySize()
public float getExpansionFactor()
public boolean add(int value)
MutableIntSet
add
in interface MutableIntSet
value
- public void copySet(IntSet that) throws IllegalArgumentException
MutableIntSet
copySet
in interface MutableIntSet
IllegalArgumentException
- if that == nullpublic void intersectWith(IntSet set)
MutableIntSet
intersectWith
in interface MutableIntSet
public void intersectWith(SparseIntSet set)
public boolean addAll(IntSet set) throws IllegalArgumentException
addAll
in interface MutableIntSet
IllegalArgumentException
- if set == nullpublic boolean addAll(SparseIntSet that)
that
- public void removeAll(BitVectorIntSet v)
public <T extends BitVectorBase<T>> void removeAll(T v)
public void removeAll(MutableSparseIntSet set)
set
- IllegalArgumentException
- if set is nullpublic boolean addAllInIntersection(IntSet other, IntSet filter)
addAllInIntersection
in interface MutableIntSet
public static MutableSparseIntSet diff(MutableSparseIntSet A, MutableSparseIntSet B)
public static MutableSparseIntSet make(IntSet set)
public static MutableSparseIntSet makeEmpty()
public static MutableSparseIntSet createMutableSparseIntSet(int initialCapacity) throws IllegalArgumentException
IllegalArgumentException