public final class IntegerRange extends NumberRange<java.lang.Integer>
NumberRange
for Integer
s.
This class is not designed to interoperate with other NumberRanges
Modifier and Type | Method and Description |
---|---|
static IntegerRange |
of(java.lang.Integer fromInclusive,
java.lang.Integer toInclusive)
Creates a range with the specified minimum and maximum values (both inclusive).
|
static IntegerRange |
of(int fromInclusive,
int 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 IntegerRange of(int fromInclusive, int 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 IntegerRange of(java.lang.Integer fromInclusive, java.lang.Integer 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