public final class LongRange extends NumberRange<java.lang.Long>
NumberRange
for Long
s.
This class is not designed to interoperate with other NumberRanges
Modifier and Type | Method and Description |
---|---|
static LongRange |
of(long fromInclusive,
long toInclusive)
Creates a range with the specified minimum and maximum values (both inclusive).
|
static LongRange |
of(java.lang.Long fromInclusive,
java.lang.Long toInclusive)
Creates a range with the specified minimum and maximum values (both inclusive).
|
between, between, contains, containsRange, elementCompareTo, equals, fit, getComparator, getMaximum, getMinimum, hashCode, intersectionWith, is, is, isAfter, isAfterRange, isBefore, isBeforeRange, isEndedBy, isNaturalOrdering, isOverlappedBy, isStartedBy, of, toString, toString
public static LongRange of(long fromInclusive, long toInclusive)
The range uses the natural ordering of the elements to determine where values lie in the range.
The arguments may be passed in the order (min,max) or (max,min). The getMinimum and getMaximum methods will return the correct values.
fromInclusive
- the first value that defines the edge of the range, inclusive.toInclusive
- the second value that defines the edge of the range, inclusive.public static LongRange of(java.lang.Long fromInclusive, java.lang.Long toInclusive)
The range uses the natural ordering of the elements to determine where values lie in the range.
The arguments may be passed in the order (min,max) or (max,min). The getMinimum and getMaximum methods will return the correct values.
fromInclusive
- the first value that defines the edge of the range, inclusive.toInclusive
- the second value that defines the edge of the range, inclusive.java.lang.IllegalArgumentException
- if either element is null.Copyright © 2010 - 2023 Adobe. All Rights Reserved