org.jfree.chart.axis

Class NumberTickUnit

Implemented Interfaces:
Comparable, Serializable

public class NumberTickUnit
extends TickUnit
implements Serializable

A numerical tick unit.

Constructor Summary

NumberTickUnit(double size)
Creates a new number tick unit.
NumberTickUnit(double size, NumberFormat formatter)
Creates a new number tick unit.

Method Summary

boolean
equals(Object obj)
Tests this formatter for equality with an arbitrary object.
int
hashCode()
Returns a hash code for this instance.
String
valueToString(double value)
Converts a value to a string.

Methods inherited from class org.jfree.chart.axis.TickUnit

compareTo, equals, getSize, hashCode, valueToString

Constructor Details

NumberTickUnit

public NumberTickUnit(double size)
Creates a new number tick unit.
Parameters:
size - the size of the tick unit.

NumberTickUnit

public NumberTickUnit(double size,
                      NumberFormat formatter)
Creates a new number tick unit.
Parameters:
size - the size of the tick unit.
formatter - a number formatter for the tick unit (null not permitted).

Method Details

equals

public boolean equals(Object obj)
Tests this formatter for equality with an arbitrary object.
Overrides:
equals in interface TickUnit
Parameters:
obj - the object (null permitted).
Returns:
A boolean.

hashCode

public int hashCode()
Returns a hash code for this instance.
Overrides:
hashCode in interface TickUnit
Returns:
A hash code.

valueToString

public String valueToString(double value)
Converts a value to a string.
Overrides:
valueToString in interface TickUnit
Parameters:
value - the value.
Returns:
The formatted string.