public class IntegerSequence extends Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
IntegerSequence.Incrementor |
Utility that increments a counter until a maximum is reached, at
which point, the instance will by default throw a
MaxCountExceededException. |
static class |
IntegerSequence.Range |
Generates a sequence of integers.
|
| Modifier and Type | Method | Description |
|---|---|---|
static IntegerSequence.Range |
range(int start,
int end) |
Creates a sequence
[start .. end]. |
static IntegerSequence.Range |
range(int start,
int max,
int step) |
Creates a sequence
ai, i < 0 < n
where ai = start + i * step
and n is such that an <= max
and an+1 > max. |
public static IntegerSequence.Range range(int start, int end)
[start .. end].
It calls range(start, end, 1).start - First value of the range.end - Last value of the range.public static IntegerSequence.Range range(int start, int max, int step)
ai, i < 0 < n
where ai = start + i * step
and n is such that an <= max
and an+1 > max.start - First value of the range.max - Last value of the range that satisfies the above
construction rule.step - Increment.Copyright © 2003–2017 The Apache Software Foundation. All rights reserved.