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