|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jidesoft.range.AbstractRange<T>
com.jidesoft.range.AbstractNumericRange<java.lang.Integer>
com.jidesoft.range.IntegerRange
public class IntegerRange
Specifies upper and lower bounds for a range of values
| Field Summary | |
|---|---|
protected int |
_max
|
protected int |
_min
|
| Fields inherited from interface com.jidesoft.range.Range |
|---|
PROPERTY_MAX, PROPERTY_MIN |
| Constructor Summary | |
|---|---|
IntegerRange()
Creates a numeric range with minimum 0.0 and maximum of 1.0 |
|
IntegerRange(int min,
int max)
Create a numeric range by supplying minimum and maximum values |
|
| Method Summary | |
|---|---|
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 |
boolean |
equals(java.lang.Object other)
Test for equality based on the values of min and max |
int |
getMax()
|
int |
getMin()
|
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()
|
| Methods inherited from class com.jidesoft.range.AbstractRange |
|---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int _min
protected int _max
| Constructor Detail |
|---|
public IntegerRange()
public IntegerRange(int min,
int max)
min - the minumummax - the maximum| Method Detail |
|---|
public double minimum()
Range
public double maximum()
Range
public 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)
Range
lower - the new smallest value of the rangeupper - the new largest value of the rangepublic double size()
Range
public java.lang.Integer lower()
public java.lang.Integer upper()
public boolean contains(java.lang.Integer x)
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||