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 PositiveIntSet
public IntListIterator getUnorderedIterator()
public IntListIterator getOrderedIterator()
public void clear()
PositiveIntSet
clear
in interface PositiveIntSet
public boolean contains(int key)
contains
in interface PositiveIntSet
key
- -public int find(int element)
find
in interface PositiveIntSet
element
- an item which may be in the setpublic boolean add(int key)
add
in interface PositiveIntSet
key
- -public boolean remove(int key)
remove
in interface PositiveIntSet
key
- -public int size()
size
in interface PositiveIntSet
public int[] toUnorderedIntArray()
public int[] toOrderedIntArray()
public int get(int position)
PositiveIntSet
get
in interface PositiveIntSet
position
- - get the element at this position. This is for iterator use only, and is not related to any keypublic int moveToFirst()
PositiveIntSet
moveToFirst
in interface PositiveIntSet
public int moveToLast()
PositiveIntSet
moveToLast
in interface PositiveIntSet
public int moveToNext(int position)
PositiveIntSet
moveToNext
in interface PositiveIntSet
position
- -public int moveToPrevious(int position)
PositiveIntSet
moveToPrevious
in interface PositiveIntSet
position
- -public boolean isValid(int position)
PositiveIntSet
isValid
in interface PositiveIntSet
position
- -public void bulkAddTo(IntVector v)
PositiveIntSet
bulkAddTo
in interface PositiveIntSet
v
- - to be added topublic int[] toIntArray()
toIntArray
in interface PositiveIntSet
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.