public class LongRange extends AbstractNumericRange<java.lang.Long>
| Modifier and Type | Field and Description |
|---|---|
protected long |
_max |
protected long |
_min |
PROPERTY_MAX, PROPERTY_MIN| Constructor and 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 and Description |
|---|---|
void |
adjust(java.lang.Long lower,
java.lang.Long upper)
Adjusts the range.
|
boolean |
contains(java.lang.Long x)
Determines whether the range contains the supplied value
|
Range<java.lang.Long> |
copy() |
Range<java.lang.Long> |
createIntermediate(Range<java.lang.Long> targetRange,
double position) |
boolean |
equals(java.lang.Object other)
Test for equality based on the values of min and max
|
long |
getMax() |
long |
getMin() |
int |
hashCode() |
java.lang.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
|
java.lang.String |
toString() |
java.lang.Long |
upper() |
addPropertyChangeListener, compareTo, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListenerpublic LongRange()
public LongRange(long min,
long max)
min - the minimummax - the maximumpublic LongRange(LongRange integerRange)
integerRange - the long range object to copypublic Range<java.lang.Long> copy()
copy in class AbstractRange<java.lang.Long>public double minimum()
Rangepublic double maximum()
Rangepublic 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(java.lang.Long lower,
java.lang.Long upper)
Rangelower - the new smallest value of the rangeupper - the new largest value of the rangepublic double size()
Rangepublic java.lang.Long lower()
public java.lang.Long upper()
public boolean contains(java.lang.Long x)
public Range<java.lang.Long> createIntermediate(Range<java.lang.Long> targetRange, double position)
createIntermediate in class AbstractRange<java.lang.Long>public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object