|
||||||||||
| 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.CategoryRange<T>
public class CategoryRange<T>
Note that this class is iterable so you can use it in an advanced for.. loop
| Field Summary |
|---|
| Fields inherited from interface com.jidesoft.range.Range |
|---|
PROPERTY_MAX, PROPERTY_MIN |
| Constructor Summary | |
|---|---|
CategoryRange()
|
|
CategoryRange(CategoryRange<T> categoryRange)
Create a new CategoryRange by copying an existing one. |
|
CategoryRange(Set<T> values)
Create a CategoryRange from a set of values. |
|
CategoryRange(T... values)
Create a CategoryRange from the supplied values |
|
| Method Summary | |
|---|---|
CategoryRange<T> |
add(Category<T> c)
Adds a category to the range. |
void |
adjust(T lower,
T upper)
Not supported for Category Ranges |
boolean |
contains(Category<T> value)
Determines whether the category range contains the specified category value |
boolean |
contains(T x)
Determines whether the category range contains the supplied possible value |
Range<T> |
copy()
|
boolean |
equals(Object obj)
|
Category<T> |
getCategory(int position)
Returns the category with the supplied position value. |
List<Category<T>> |
getCategoryValues()
|
List<T> |
getPossibleValues()
|
int |
hashCode()
|
Iterator<Category<T>> |
iterator()
|
T |
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. |
int |
position(T value)
|
void |
reset()
Reset the maximum and minimum. |
void |
setMaximum(double value)
|
void |
setMinimum(double value)
|
double |
size()
Returns the size of the range, as given by the maximum minus the minimum. |
String |
toString()
|
T |
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, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CategoryRange()
public CategoryRange(T... values)
values - the values.public CategoryRange(Set<T> values)
upper() and a lower() value.
values - - the set of possible valuespublic CategoryRange(CategoryRange<T> categoryRange)
categoryRange - the category range instance to copy| Method Detail |
|---|
public List<T> getPossibleValues()
public Category<T> getCategory(int position)
position - the position of a category along an axis
public CategoryRange<T> add(Category<T> c)
Adds a category to the range. Note that after adding categories, you will need to call reset() if you want the minimum and maximum numeric values of the range to be recomputed.
This method fires a property change event, but to avoid cloning a list for efficiency, the old value is always null
c - the category to add
public Range<T> copy()
copy in class AbstractRange<T>public T lower()
lower in interface Range<T>public T upper()
upper in interface Range<T>
public void adjust(T lower,
T upper)
adjust in interface Range<T>lower - the new smallest value of the rangeupper - the new largest value of the rangepublic double maximum()
Range
maximum in interface Range<T>Range.maximum()public double minimum()
Range
minimum in interface Range<T>Range.minimum()public void reset()
public void setMinimum(double value)
public void setMaximum(double value)
public double size()
size in interface Range<T>Range.size()public int position(T value)
public boolean contains(T x)
contains in interface Range<T>public boolean contains(Category<T> value)
value - the category value.
public Iterator<Category<T>> iterator()
iterator in interface Iterable<Category<T>>public List<Category<T>> getCategoryValues()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||