N - The Number class.public class NumberRange<N extends Number> extends Range<N>
Range for Numbers.
We only offer specializations for Integer, Long, and Double (like Java Streams).
| Constructor and Description |
|---|
NumberRange(N number1,
N number2,
Comparator<N> comp)
Creates an instance.
|
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, toStringpublic NumberRange(N number1, N number2, Comparator<N> comp)
number1 - the first element, not nullnumber2 - the second element, not nullcomp - the comparator to be used, null for natural orderingNullPointerException - when element1 is null.NullPointerException - when element2 is null.Copyright © 2001–2023 The Apache Software Foundation. All rights reserved.