Package org.apache.commons.lang3
Class NumberRange<N extends Number>
java.lang.Object
org.apache.commons.lang3.Range<N>
org.apache.commons.lang3.NumberRange<N>
- Type Parameters:
N
- The Number class.
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DoubleRange
,IntegerRange
,LongRange
Specializes
Range
for Number
s.
We only offer specializations for Integer, Long, and Double (like Java Streams).
- Since:
- 3.13.0
- See Also:
-
Constructor Summary
-
Method Summary
Methods inherited from class org.apache.commons.lang3.Range
between, between, contains, containsRange, elementCompareTo, equals, fit, getComparator, getMaximum, getMinimum, hashCode, intersectionWith, is, is, isAfter, isAfterRange, isBefore, isBeforeRange, isEndedBy, isNaturalOrdering, isOverlappedBy, isStartedBy, of, of, toString, toString
-
Constructor Details
-
NumberRange
Creates an instance.- Parameters:
number1
- the first element, not nullnumber2
- the second element, not nullcomp
- the comparator to be used, null for natural ordering- Throws:
NullPointerException
- when element1 is null.NullPointerException
- when element2 is null.
-