public class IndexSet extends NativeObject
Constructor and Description |
---|
IndexSet()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addIndex(long idx)
Adds an index.
|
void |
addIndexSet(IndexSet indexSet)
Adds indexes of the given set of indexes.
|
void |
addRange(Range range)
Adds a range of values.
|
java.util.List<Range> |
allRanges()
Returns all the ranges that the set contains.
|
boolean |
containsIndex(long idx)
Returns whether the set of indexes holds the given value.
|
int |
count()
Returns the number of indexes.
|
static IndexSet |
indexSet()
Returns an empty set of indexes.
|
static IndexSet |
indexSetWithIndex(long idx)
Returns a set of indexes with a single value.
|
static IndexSet |
indexSetWithRange(Range range)
Returns a set of indexes with a range.
|
void |
intersectsIndexSet(IndexSet indexSet)
Intersects with the given set of indexes.
|
void |
intersectsRange(Range range)
Intersects with the given range.
|
int |
rangesCount()
Returns the number of ranges that the set contains.
|
void |
removeAllIndexes()
Empties the set.
|
void |
removeIndex(long idx)
Removes an index.
|
void |
removeIndexSet(IndexSet indexSet)
Removes indexes of the given set.
|
void |
removeRange(Range range)
Remove a range of values.
|
clone, finalize, initWithNative, readObject, toString, writeObject
public static IndexSet indexSet()
public static IndexSet indexSetWithRange(Range range)
public static IndexSet indexSetWithIndex(long idx)
public int count()
public void addIndex(long idx)
public void removeIndex(long idx)
public boolean containsIndex(long idx)
public void addRange(Range range)
public void removeRange(Range range)
public void intersectsRange(Range range)
public void addIndexSet(IndexSet indexSet)
public void removeIndexSet(IndexSet indexSet)
public void intersectsIndexSet(IndexSet indexSet)
public java.util.List<Range> allRanges()
public int rangesCount()
public void removeAllIndexes()