Package org.jfree.chart.axis
Class StandardTickUnitSource
- java.lang.Object
-
- org.jfree.chart.axis.StandardTickUnitSource
-
- All Implemented Interfaces:
java.io.Serializable
,TickUnitSource
public class StandardTickUnitSource extends java.lang.Object implements TickUnitSource, java.io.Serializable
A source that can used by theNumberAxis
class to obtain a suitableTickUnit
. Instances of this class areSerializable
from version 1.0.7 onwards. Cloning is not supported, because instances are immutable.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static double
LOG_10_VALUE
Constant for log(10.0).
-
Constructor Summary
Constructors Constructor Description StandardTickUnitSource()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.TickUnit
getCeilingTickUnit(double size)
Returns the tick unit in the collection that is greater than or equal to the specified size.TickUnit
getCeilingTickUnit(TickUnit unit)
Returns the tick unit in the collection that is greater than or equal to (in size) the specified unit.TickUnit
getLargerTickUnit(TickUnit unit)
Returns a tick unit that is larger than the supplied unit.int
hashCode()
Returns a hash code for this instance.
-
-
-
Method Detail
-
getLargerTickUnit
public TickUnit getLargerTickUnit(TickUnit unit)
Returns a tick unit that is larger than the supplied unit.- Specified by:
getLargerTickUnit
in interfaceTickUnitSource
- Parameters:
unit
- the unit (null
not permitted).- Returns:
- A tick unit that is larger than the supplied unit.
-
getCeilingTickUnit
public TickUnit getCeilingTickUnit(TickUnit unit)
Returns the tick unit in the collection that is greater than or equal to (in size) the specified unit.- Specified by:
getCeilingTickUnit
in interfaceTickUnitSource
- Parameters:
unit
- the unit (null
not permitted).- Returns:
- A unit from the collection.
-
getCeilingTickUnit
public TickUnit getCeilingTickUnit(double size)
Returns the tick unit in the collection that is greater than or equal to the specified size.- Specified by:
getCeilingTickUnit
in interfaceTickUnitSource
- Parameters:
size
- the size.- Returns:
- A unit from the collection.
-
equals
public boolean equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- the object (null
permitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code for this instance.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- A hash code.
-
-