public final class LongRangeEnumerator extends Object implements PrimitiveIterator.OfLong, Enumerator<Long>
Enumerator and PrimitiveIterator.OfLong enumerating
over a range of long integers.Enumerator,
PrimitiveIteratorPrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong| Constructor and Description |
|---|
LongRangeEnumerator(long start,
long end,
boolean isInclusive)
Constructs an
LongRangeEnumerator instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
enumerating()
Returns whether the enumerator has started enumerating.
|
boolean |
hasNext() |
Long |
next() |
long |
nextLong() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, forEachRemainingallMatch, anyMatch, append, as, asEnumerable, asEnumeration, asFiltered, asOptional, asShareable, asSpliterator, asStream, asSupplier, asTolerant, asTolerant, choiceOf, choiceOf, collect, concat, concat, concat, concat, concat, concat, concatOn, contains, count, distinct, elementAt, elementsEqual, empty, filter, first, flatMap, forEach, iterate, last, limit, limitWhile, map, map, max, min, noneMatch, of, of, of, of, of, of, of, ofLateBinding, ofLazyEnumeration, ofLazyIterable, ofLazyIterator, ofLazySpliterator, ofLazyStream, on, peek, prepend, prepend, prepend, prepend, prepend, prepend, prependOn, range, rangeClosed, rangeInt, rangeIntClosed, rangeLong, rangeLongClosed, reduce, reduce, repeat, repeatAll, repeatAll, repeatEach, reverse, single, skip, skipWhile, sorted, sorted, take, takeWhile, toArray, toList, toMap, toSet, union, union, union, union, union, union, unionOn, zipAll, zipAny, zipBoth, zipLeft, zipRightpublic LongRangeEnumerator(long start,
long end,
boolean isInclusive)
LongRangeEnumerator instance.start - lower limit of long integer range.end - upper limit of long integer range.isInclusive - true if end is an inclusive upper
limit, false otherwise.public boolean enumerating()
Enumerator
This method returns false before the first call
to hasNext and true afterwards.
enumerating in interface Enumerator<Long>Iterator.hasNext(),
Iterator.next()public long nextLong()
nextLong in interface PrimitiveIterator.OfLongCopyright © 2016. All rights reserved.