org.jfree.chart.axis
public abstract class TickUnit extends Object implements Comparable, Serializable
This class (and any subclasses) should be immutable, the reason being that ORDERED collections of tick units are maintained and if one instance can be changed, it may destroy the order of the collection that it belongs to. In addition, if the implementations are immutable, they can belong to multiple collections.
See Also: ValueAxis
Constructor Summary | |
---|---|
TickUnit(double size)
Constructs a new tick unit.
|
Method Summary | |
---|---|
int | compareTo(Object object)
Compares this tick unit to an arbitrary object.
|
boolean | equals(Object obj)
Tests this unit for equality with another object.
|
double | getSize()
Returns the size of the tick unit.
|
int | hashCode()
Returns a hash code for this instance.
|
String | valueToString(double value)
Converts the supplied value to a string.
|
Parameters: size the tick unit size.
Parameters: object the object to compare against.
Returns: 1
if the size of the other object is less than this,
0
if both have the same size and -1
this
size is less than the others.
Parameters: obj the object.
Returns: true
or false
.
Returns: The size of the tick unit.
Returns: A hash code.
Subclasses may implement special formatting by overriding this method.
Parameters: value the data value.
Returns: Value as string.