Constructor and Description |
---|
Range(N min,
N max)
Creates a range.
|
Range(Object min,
Object max) |
Modifier and Type | Method and Description |
---|---|
boolean |
adjust(N x)
Adjusts this range by the given number.
|
boolean |
contains(Number x)
Affirms if the given value is within this range.
|
<X extends Number> |
contains(Range<X> r)
Affirms if the given range is within this range.
|
boolean |
equals(Object obj) |
N |
getMaximum()
Gets the maximum value.
|
N |
getMinimum()
Gets the minimum value.
|
int |
hashCode() |
Class<N> |
type() |
public boolean contains(Number x)
x
- a non-null valuepublic <X extends Number> boolean contains(Range<X> r)
x
- a non-null valuepublic N getMinimum()
public N getMaximum()
public boolean adjust(N x)
x
- a non-null value.Copyright © 2006–2018 Apache Software Foundation. All rights reserved.