public class PositiveIntSet_impl extends Object implements PositiveIntSet
| Modifier and Type | Field and Description |
|---|---|
static int[] |
EMPTY_INT_ARRAY |
| Constructor and Description |
|---|
PositiveIntSet_impl() |
PositiveIntSet_impl(int initialSize,
int estMin,
int estMax)
Set up a Positive Bit Set
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(int key) |
void |
bulkAddTo(IntVector v)
add all elements in this set to the IntVector v as a bulk operation
|
void |
clear()
remove all members of the set
|
boolean |
contains(int key) |
int |
find(int element) |
int |
get(int position)
For FSBagIndex low level iterator use
DOESN"T WORK WITH INCREMENTING position VALUES
|
IntListIterator |
getOrderedIterator() |
IntListIterator |
getUnorderedIterator() |
boolean |
isValid(int position)
For FSBagIndex low level iterator use
|
IntListIterator |
iterator() |
int |
moveToFirst()
For FSBagIndex low level iterator use
|
int |
moveToLast()
For FSBagIndex low level iterator use
|
int |
moveToNext(int position)
For FSBagIndex low level iterator use
|
int |
moveToPrevious(int position)
For FSBagIndex low level iterator use
|
boolean |
remove(int key) |
int |
size() |
int[] |
toIntArray() |
int[] |
toOrderedIntArray() |
String |
toString() |
int[] |
toUnorderedIntArray() |
public PositiveIntSet_impl()
public PositiveIntSet_impl(int initialSize,
int estMin,
int estMax)
initialSize - - if 0, don't allocate yet, wait for first add.
If isBitSetDense, then this number is interpreted as
the first int to be added, typically with an offset.
The next two params are used only if initialSize is not 0.estMin - - the estimated minimum int value to be addedestMax - - the estimated max int value to be addedpublic IntListIterator iterator()
iterator in interface PositiveIntSetpublic IntListIterator getUnorderedIterator()
public IntListIterator getOrderedIterator()
public void clear()
PositiveIntSetclear in interface PositiveIntSetpublic boolean contains(int key)
contains in interface PositiveIntSetkey - -public int find(int element)
find in interface PositiveIntSetelement - an item which may be in the setpublic boolean add(int key)
add in interface PositiveIntSetkey - -public boolean remove(int key)
remove in interface PositiveIntSetkey - -public int size()
size in interface PositiveIntSetpublic int[] toUnorderedIntArray()
public int[] toOrderedIntArray()
public int get(int position)
PositiveIntSetget in interface PositiveIntSetposition - - get the element at this position. This is for iterator use only, and is not related to any keypublic int moveToFirst()
PositiveIntSetmoveToFirst in interface PositiveIntSetpublic int moveToLast()
PositiveIntSetmoveToLast in interface PositiveIntSetpublic int moveToNext(int position)
PositiveIntSetmoveToNext in interface PositiveIntSetposition - -public int moveToPrevious(int position)
PositiveIntSetmoveToPrevious in interface PositiveIntSetposition - -public boolean isValid(int position)
PositiveIntSetisValid in interface PositiveIntSetposition - -public void bulkAddTo(IntVector v)
PositiveIntSetbulkAddTo in interface PositiveIntSetv - - to be added topublic int[] toIntArray()
toIntArray in interface PositiveIntSetCopyright © 2018. All rights reserved.