com.jidesoft.range
Class Category<T>

java.lang.Object
  extended by com.jidesoft.range.Category<T>
All Implemented Interfaces:
Positionable, java.lang.Comparable<Positionable>

public class Category<T>
extends java.lang.Object
implements 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)

Constructor Summary
Category(java.lang.String name, T value)
           
Category(java.lang.String name, T value, CategoryRange<T> range)
           
Category(T value)
           
Category(T value, CategoryRange<T> range)
           
 
Method Summary
 int compareTo(Positionable o)
           
 boolean equals(java.lang.Object other)
           
 java.lang.String getName()
           
 CategoryRange<T> getRange()
           
 T getValue()
           
 double position()
          Map the Positionable object to a numeric value (a double) so that it can be positioned on an axis.
 void setRange(CategoryRange<T> range)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Category

public Category(java.lang.String name,
                T value)

Category

public Category(java.lang.String name,
                T value,
                CategoryRange<T> range)

Category

public Category(T value)

Category

public Category(T value,
                CategoryRange<T> range)
Method Detail

getRange

public CategoryRange<T> getRange()

setRange

public void setRange(CategoryRange<T> range)

position

public double position()
Description copied from interface: Positionable
Map the Positionable object to a numeric value (a double) so that it can be positioned on an axis.

Specified by:
position in interface Positionable
Returns:
the position of the object

getValue

public T getValue()

getName

public java.lang.String getName()

compareTo

public int compareTo(Positionable o)
Specified by:
compareTo in interface java.lang.Comparable<Positionable>

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009. All Rights Reserved.