|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.Functional.Range
public static final class Functional.Range
An iterable representing a range of integers. Useful for iterating over integers in a foreach loop without using memory for the integers. (However, old-style ugly for loops are still more efficient since they can be done with only primitives.)
Has no public constructors; use Functional.range(int, int) or
another such to obtain one.
| Nested Class Summary | |
|---|---|
class |
Functional.Range.RangeIterator
|
| Field Summary | |
|---|---|
int |
start
The beginning of the range. |
int |
step
The increment at each step. |
int |
stop
The first integer after the range. |
| Method Summary | |
|---|---|
Functional.Range.RangeIterator |
iterator()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final int start
public final int stop
public final int step
| Method Detail |
|---|
public Functional.Range.RangeIterator iterator()
iterator in interface Iterable<Integer>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||