public final class IntRangeEnumerator extends Object implements PrimitiveIterator.OfInt, Enumerator<Integer>
Enumerator and PrimitiveIterator.OfInt enumerating
over a range of integers.Enumerator,
PrimitiveIteratorPrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong| Constructor and Description |
|---|
IntRangeEnumerator(int start,
int end,
boolean isInclusive)
Constructs an
IntRangeEnumerator instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
enumerating()
Returns whether the enumerator has started enumerating.
|
boolean |
hasNext() |
Integer |
next() |
int |
nextInt() |
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 IntRangeEnumerator(int start,
int end,
boolean isInclusive)
IntRangeEnumerator instance.start - lower limit of integer range.end - upper limit of integer range.isInclusive - true if end is an inclusive upper
limit, false otherwise.IntRangeEnumeratorpublic boolean enumerating()
Enumerator
This method returns false before the first call
to hasNext and true afterwards.
enumerating in interface Enumerator<Integer>Iterator.hasNext(),
Iterator.next()public int nextInt()
nextInt in interface PrimitiveIterator.OfIntCopyright © 2016. All rights reserved.