public class IntRange extends LazyRange<Integer>
C.Featured.Factory
Modifier and Type | Field and Description |
---|---|
protected T |
head |
protected Lang.F0<C.Sequence<T>> |
tail |
Constructor and Description |
---|
IntRange(int from,
int to) |
IntRange(int from,
int to,
int stepLen) |
Modifier and Type | Method and Description |
---|---|
C.List<T> |
asList()
Returns a List contains all the elements in this sequence with the same order.
|
String |
debug() |
T |
first()
Alias of
C.Sequence.head() |
int |
get(int id) |
protected EnumSet<C.Feature> |
initFeatures()
Sub class should override this method to provide initial feature set for the feature based instance
|
boolean |
isEmpty()
Is this traversal empty?
|
Iterator<T> |
iterator() |
static IntRange |
of(int from,
int to) |
N.IntRangeStep |
step()
Returns a
Lang.Func2 function that applied to an element in this Range and an integer n indicate the number of steps. |
accept, acceptLeft, acceptRight, contains, containsAll, drop, each, equals, findLast, forEach, from, hashCode, head, last, merge, of, order, reduceRight, reduceRight, reverse, reverseIterator, size, tail, tail, take, to, toString
append, append, append, append, append, collect, count, count, dropWhile, eager, filter, findFirst, flatMap, forEachLeft, head, isImmutable, isLazy, isLimited, isMutable, isReadOnly, lazy, map, parallel, prepend, prepend, prepend, prepend, prepend, reduceLeft, reduceLeft, sequential, takeWhile, zip, zipAll, zipWithIndex
allMatch, anyMatch, findOne, generateHashCode, noneMatch, reduce, reduce
features_, features, is, setFeature, unsetFeature
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
append, append, append, append, append, asList, collect, count, dropWhile, eager, filter, findFirst, first, flatMap, head, lazy, map, parallel, prepend, prepend, prepend, prepend, prepend, reduce, reduce, reduceLeft, reduceLeft, sequential, takeWhile, zip, zipAll, zipWithIndex
allMatch, anyMatch, findOne, isEmpty, noneMatch
forEach, iterator, spliterator
features, is
protected T head
protected Lang.F0<C.Sequence<T>> tail
public IntRange(int from, int to)
public IntRange(int from, int to, int stepLen)
public N.IntRangeStep step()
C.Range
Returns a Lang.Func2
function that applied to an element in this Range
and an integer n
indicate the number of steps. The result of the function is an element in the range or the range domain after moving n
steps based on the element.
If the element apply is null
, the function should throw out NullPointerException
; if the resulting element is not defined in the range domain, the function should throw out NoSuchElementException
public int get(int id)
public static IntRange of(int from, int to)
protected EnumSet<C.Feature> initFeatures()
FeaturedBase
Sub class should override this method to provide initial feature set for the feature based instance
initFeatures
in class SequenceBase<T>
public boolean isEmpty()
C.Traversable
Is this traversal empty?
isEmpty
in interface C.Traversable<T>
isEmpty
in class TraversableBase<T>
true
if the traversal is empty or false
otherwisepublic T first()
C.Sequence
Alias of C.Sequence.head()
first
in interface C.Sequence<T>
first
in class SequenceBase<T>
public C.List<T> asList()
C.Sequence
Returns a List contains all the elements in this sequence with the same order.
asList
in interface C.Sequence<T>
asList
in class SequenceBase<T>
public String debug()
Copyright © 2014–2019 OSGL (Open Source General Library). All rights reserved.