public class MutableSharedBitVectorIntSet extends Object implements MutableIntSet
Constructor and Description |
---|
MutableSharedBitVectorIntSet() |
MutableSharedBitVectorIntSet(BitVectorIntSet s) |
MutableSharedBitVectorIntSet(MutableSharedBitVectorIntSet set) |
MutableSharedBitVectorIntSet(SparseIntSet s) |
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 |
containsAny(IntSet set) |
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
|
boolean |
hasSharedPart() |
IntSet |
intersection(IntSet that)
This implementation must not despoil the original value of "this"
|
IntSet |
intersection(MutableSharedBitVectorIntSet that) |
void |
intersectWith(IntSet set)
Intersect this with another set.
|
IntIterator |
intIterator() |
boolean |
isEmpty() |
boolean |
isSubset(IntSet that) |
int |
max() |
boolean |
remove(int i)
Remove an integer from this set.
|
static boolean |
sameSharedPart(MutableSharedBitVectorIntSet a,
MutableSharedBitVectorIntSet b) |
boolean |
sameValue(IntSet that) |
int |
size() |
String |
toString() |
IntSet |
union(IntSet that)
This implementation must not despoil the original value of "this"
|
public MutableSharedBitVectorIntSet()
public MutableSharedBitVectorIntSet(MutableSharedBitVectorIntSet set)
set
- IllegalArgumentException
- if set is nullpublic MutableSharedBitVectorIntSet(SparseIntSet s)
s
- IllegalArgumentException
- if s is nullpublic MutableSharedBitVectorIntSet(BitVectorIntSet s)
s
- IllegalArgumentException
- if s is nullpublic boolean contains(int i)
public IntSet intersection(IntSet that)
IntSet
intersection
in interface IntSet
public IntSet union(IntSet that)
IntSet
public IntSet intersection(MutableSharedBitVectorIntSet that)
public boolean isEmpty()
public int size()
public IntIterator intIterator()
intIterator
in interface IntSet
public void foreach(IntSetAction action)
IntSet
public void foreachExcluding(IntSet X, IntSetAction action)
IntSet
foreachExcluding
in interface IntSet
public boolean sameValue(IntSet that) throws IllegalArgumentException, UnimplementedError
sameValue
in interface IntSet
this
has the same value as that
.IllegalArgumentException
UnimplementedError
public boolean isSubset(IntSet that)
public void copySet(IntSet set)
MutableIntSet
copySet
in interface MutableIntSet
public boolean addAll(IntSet set) throws IllegalArgumentException
MutableIntSet
addAll
in interface MutableIntSet
IllegalArgumentException
public boolean add(int i)
MutableIntSet
add
in interface MutableIntSet
i
- integer to addpublic boolean remove(int i)
MutableIntSet
remove
in interface MutableIntSet
i
- integer to removepublic void intersectWith(IntSet set)
MutableIntSet
intersectWith
in interface MutableIntSet
public static boolean sameSharedPart(MutableSharedBitVectorIntSet a, MutableSharedBitVectorIntSet b)
public boolean hasSharedPart()
public boolean containsAny(IntSet set)
containsAny
in interface IntSet
public boolean addAllInIntersection(IntSet other, IntSet filter)
addAllInIntersection
in interface MutableIntSet
public void clear()
MutableIntSet
clear
in interface MutableIntSet