public class IntBitSet extends Object implements PositiveIntSet
Constructor and Description |
---|
IntBitSet()
Construct an IntBitSet capable of holding ints from 0 to 63, (perhaps plus an offset)
|
IntBitSet(int maxInt)
Construct an IntBitSet capable of holding ints from 0 to maxInt (perhaps plus an offset)
|
IntBitSet(int maxAdjKey,
int offset) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(int original_key) |
void |
bulkAddTo(IntVector v)
Add all elements of this bit set to the passed in IntVector
|
void |
clear()
empty the IntBitSet.
|
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
|
int |
getLargestMenber() |
int |
getOffset() |
int |
getSpaceUsed_in_bits_no_overhead() |
int |
getSpaceUsed_in_words_no_overhead() |
boolean |
isValid(int position)
This impl depends on position always pointing to a valid (== non 0)
element of the set, when it should be valid
|
org.apache.uima.internal.util.IntBitSet.IntBitSetIterator |
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 original_key) |
int |
size() |
int[] |
toIntArray() |
String |
toString() |
public IntBitSet()
public IntBitSet(int maxInt)
maxInt
- the biggest int (perhaps plus an offset) that can be held without growing the spacepublic IntBitSet(int maxAdjKey, int offset)
public int getOffset()
public void clear()
clear
in interface PositiveIntSet
public boolean contains(int key)
contains
in interface PositiveIntSet
key
- - the integer (not adjusted for offset)public int find(int element)
find
in interface PositiveIntSet
element
- an item which may be in the setpublic boolean add(int original_key)
add
in interface PositiveIntSet
original_key
- - the int to add to the setpublic boolean remove(int original_key)
remove
in interface PositiveIntSet
original_key
- -public int size()
size
in interface PositiveIntSet
public int getSpaceUsed_in_bits_no_overhead()
public int getSpaceUsed_in_words_no_overhead()
public int getLargestMenber()
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 org.apache.uima.internal.util.IntBitSet.IntBitSetIterator iterator()
iterator
in interface PositiveIntSet
public 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)
isValid
in interface PositiveIntSet
position
- -public void bulkAddTo(IntVector v)
bulkAddTo
in interface PositiveIntSet
v
- - to be added topublic int[] toIntArray()
toIntArray
in interface PositiveIntSet
Copyright © 2006–2023 The Apache Software Foundation. All rights reserved.