Package com.jidesoft.range
Class Category<T>
java.lang.Object
com.jidesoft.range.Category<T>
- All Implemented Interfaces:
Positionable
,Serializable
,Comparable<Positionable>
This class is really an adapter because it takes any object and allows it to be used as a Category.
- Author:
- Simon White (swhite@catalysoft.com)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
getName()
Returns the name of the category which, when set, will be used as a label for the category.getRange()
getValue()
Returns the original value of the categoryint
hashCode()
double
position()
Returns the position of the category, which will be used to decide where to place a category along an axis.void
setRange
(CategoryRange<T> range) toString()
-
Constructor Details
-
Category
-
Category
-
Category
-
Category
-
-
Method Details
-
getRange
-
setRange
-
position
public double position()Returns the position of the category, which will be used to decide where to place a category along an axis.- Specified by:
position
in interfacePositionable
- Returns:
- the position of the category
-
getValue
Returns the original value of the category- Returns:
- the value of the category
-
getName
Returns the name of the category which, when set, will be used as a label for the category. If it is not set explicitly, then the toString() of the category value will be used instead.- Returns:
- the name of the category.
-
compareTo
- Specified by:
compareTo
in interfaceComparable<T>
-
hashCode
public int hashCode() -
equals
-
toString
-