@Deprecated public final class BitSetIterator extends AbstractIntBidirectionalIterator
Iterator over the set bits in a BitSet, returning the indexes of the set bits, in order from 0 to highest index of a set bit.
| Constructor and Description |
|---|
BitSetIterator(BitSet set)
Deprecated.
Construct an iterator over a bit set.
|
BitSetIterator(BitSet set,
int start)
Deprecated.
Construct an iterator over a bit set, starting at a desired index.
|
BitSetIterator(BitSet set,
int start,
int end)
Deprecated.
Create an iterator starting at a particular bit and ending at another index.
|
BitSetIterator(BitSet set,
int start,
int end,
int initial)
Deprecated.
Create an iterator starting at a particular bit and ending at another index, with an initial position that may not be at the beginning.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Deprecated.
|
boolean |
hasPrevious()
Deprecated.
|
int |
nextInt()
Deprecated.
|
int |
previousInt()
Deprecated.
|
back, previousnext, remove, skipclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitskipskipforEachRemaining, next, removepublic BitSetIterator(BitSet set)
Construct an iterator over a bit set.
set - The set to iterate.public BitSetIterator(BitSet set, int start)
Construct an iterator over a bit set, starting at a desired index.
set - The set to iterate.start - The first bit to return.public BitSetIterator(BitSet set, int start, int end)
Create an iterator starting at a particular bit and ending at another index. The indices returned are inclusive of the starting index, and exclusive of the ending index.
set - The bit set to wrap.start - The start index, inclusive.end - The end index, exclusive.public BitSetIterator(BitSet set, int start, int end, int initial)
Create an iterator starting at a particular bit and ending at another index, with an initial position that may not be at the beginning. The indices returned are inclusive of the starting index, and exclusive of the ending index.
set - The bit set to wrap.start - The start index, inclusive.end - The end index, exclusive.initial - The initial position of the iterator. The first call to nextInt() returns the first set bit such that bit >= initial and bit < end.public boolean hasNext()
public boolean hasPrevious()
public int nextInt()
nextInt in interface IntIteratornextInt in class AbstractIntIteratorpublic int previousInt()
previousInt in interface IntBidirectionalIteratorpreviousInt in class AbstractIntBidirectionalIterator