@Public public class LongValueSequenceIterator extends SplittableIterator<LongValue>
LongValueSequenceIterator
is an iterator that returns a sequence of numbers (as
LongValue
)s. The iterator is splittable (as defined by SplittableIterator
, i.e.,
it can be divided into multiple iterators that each return a subsequence of the number sequence.Constructor and Description |
---|
LongValueSequenceIterator(long from,
long to)
Creates a new splittable iterator, returning the range [from, to].
|
Modifier and Type | Method and Description |
---|---|
long |
getCurrent() |
int |
getMaximumNumberOfSplits()
The maximum number of splits into which this iterator can be split up.
|
long |
getTo() |
boolean |
hasNext() |
LongValue |
next() |
void |
remove() |
LongValueSequenceIterator[] |
split(int numPartitions)
Splits this iterator into a number disjoint iterators.
|
getSplit
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public LongValueSequenceIterator(long from, long to)
from
- The first number returned by the iterator.to
- The last number returned by the iterator.public long getCurrent()
public long getTo()
public boolean hasNext()
public LongValue next()
public void remove()
public LongValueSequenceIterator[] split(int numPartitions)
SplittableIterator
split
in class SplittableIterator<LongValue>
numPartitions
- The number of iterators to split into.public int getMaximumNumberOfSplits()
SplittableIterator
getMaximumNumberOfSplits
in class SplittableIterator<LongValue>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.