Range<T>
, Comparable<T>
public class LongRange extends AbstractNumericRange<Long>
Modifier and Type | Field | Description |
---|---|---|
protected long |
_max |
|
protected long |
_min |
PROPERTY_MAX, PROPERTY_MIN
Constructor | Description |
---|---|
LongRange() |
Creates a numeric range with minimum 0.0 and maximum of 1.0
|
LongRange(long min,
long max) |
Create a numeric range by supplying minimum and maximum values
|
LongRange(LongRange integerRange) |
Constructs a copy of the supplied IntegerRange object
|
Modifier and Type | Method | Description |
---|---|---|
void |
adjust(Long lower,
Long upper) |
Adjusts the range.
|
boolean |
contains(Long x) |
Determines whether the range contains the supplied value
|
Range<Long> |
copy() |
|
Range<Long> |
createIntermediate(Range<Long> targetRange,
double position) |
|
boolean |
equals(Object other) |
Test for equality based on the values of min and max
|
long |
getMax() |
|
long |
getMin() |
|
int |
hashCode() |
|
Long |
lower() |
|
double |
maximum() |
This may be the numeric representation of upper() or it may be rounded up.
|
double |
minimum() |
This may be the numeric representation of lower() or it may be rounded down.
|
void |
setMax(long max) |
Sets the maximum value
|
void |
setMin(long min) |
Sets the minimum value
|
double |
size() |
Compute the size of the range
|
String |
toString() |
|
Long |
upper() |
addPropertyChangeListener, compareTo, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener
public LongRange()
public LongRange(long min, long max)
min
- the minimummax
- the maximumpublic LongRange(LongRange integerRange)
integerRange
- the long range object to copypublic Range<Long> copy()
copy
in class AbstractRange<Long>
public double minimum()
Range
public double maximum()
Range
public long getMin()
public void setMin(long min)
min
- the new minimum value.public long getMax()
public void setMax(long max)
max
- the new maximum value.public void adjust(Long lower, Long upper)
Range
lower
- the new smallest value of the rangeupper
- the new largest value of the rangepublic double size()
Range
public Long lower()
public Long upper()
public boolean contains(Long x)
public Range<Long> createIntermediate(Range<Long> targetRange, double position)
createIntermediate
in class AbstractRange<Long>
public boolean equals(Object other)