public class NumberRange extends Range<Number>
| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID |
MAX_UNBOUND, MIN_UNBOUND| Constructor and Description |
|---|
NumberRange()
The constructor.
|
NumberRange(Number min,
Number max)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected Comparator<? super Number> |
getComparator() |
NumberRange |
withMax(Number maximum) |
NumberRange |
withMin(Number minimum) |
equals, getMax, getMaximumValue, getMin, getMinimumValue, hashCode, isContained, toString, verifyContainedprivate static final long serialVersionUID
public NumberRange()
public NumberRange(Number min, Number max)
min - - see Range.getMin(). To create an open range use the minimum value.max - - see Range.getMax(). To create an open range use the maximum value.protected Comparator<? super Number> getComparator()
getComparator in class Range<Number>Comparator used to compare values of this
Range. The default implementation assumes that the value type implements Comparable. If you
want to use other value types you need to create a sub-class of Range and override this method.public NumberRange withMin(Number minimum)
withMin in class Range<Number>minimum - the new minimum value.Range where the minimum value is set to the given min
value.public NumberRange withMax(Number maximum)
withMax in class Range<Number>maximum - the new maximum value.Range where the maximum value is set to the given max
value.Copyright © 2001–2019 mmm-Team. All rights reserved.