public final class LongRange extends Object implements Serializable
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
long |
getMax()
Return the maximum value of the long range.
|
long |
getMin()
Return the minimum value of the long range.
|
int |
hashCode() |
static LongRange |
of(long min,
long max)
Create a new
LongRange object with the given min and
max values. |
LongStream |
stream()
|
String |
toString() |
public long getMin()
public long getMax()
public LongStream stream()
LongStream from getMin()
(inclusive) to getMax() (exclusive) by an incremental step of
1.
An equivalent sequence of increasing values can be produced sequentially
using a for loop as follows:
for (long i = range.getMin(); i < range.getMax(); ++i) {
...
}LongStream for the range of long
elementspublic static LongRange of(long min, long max)
LongRange object with the given min and
max values.min - the lower bound of the long rangemax - the upper bound of the long rangeLongRange objectIllegalArgumentException - if min > max© 2007-2016 Franz Wilhelmstötter (2016-04-24 10:25)