Package org.jfree.chart.axis
Class TickUnits
java.lang.Object
org.jfree.chart.axis.TickUnits
- All Implemented Interfaces:
Serializable,Cloneable,TickUnitSource
A collection of tick units, used by the
DateAxis and
NumberAxis classes.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a tick unit to the collection.clone()Returns a clone of the collection.booleanTests an object for equality with this instance.get(int pos) Returns the tickunit on the given position.getCeilingTickUnit(double size) Returns the tick unit in the collection that is greater than or equal to the specified size.getCeilingTickUnit(TickUnit unit) Returns the tick unit in the collection that is greater than or equal to (in size) the specified unit.getLargerTickUnit(TickUnit unit) Returns a tick unit that is larger than the supplied unit.intsize()Returns the number of tick units in this collection.
-
Constructor Details
-
TickUnits
public TickUnits()Constructs a new collection of tick units.
-
-
Method Details
-
add
Adds a tick unit to the collection. The tick units are maintained in ascending order.- Parameters:
unit- the tick unit to add (nullnot permitted).
-
size
Returns the number of tick units in this collection.This method is required for the XML writer.
- Returns:
- The number of units in this collection.
-
get
Returns the tickunit on the given position.This method is required for the XML writer.
- Parameters:
pos- the position in the list.- Returns:
- The tickunit.
-
getLargerTickUnit
Returns a tick unit that is larger than the supplied unit.- Specified by:
getLargerTickUnitin interfaceTickUnitSource- Parameters:
unit- the unit.- Returns:
- A tick unit that is larger than the supplied unit.
-
getCeilingTickUnit
Returns the tick unit in the collection that is greater than or equal to (in size) the specified unit.- Specified by:
getCeilingTickUnitin interfaceTickUnitSource- Parameters:
unit- the unit.- Returns:
- A unit from the collection.
-
getCeilingTickUnit
Returns the tick unit in the collection that is greater than or equal to the specified size.- Specified by:
getCeilingTickUnitin interfaceTickUnitSource- Parameters:
size- the size.- Returns:
- A unit from the collection.
-
clone
Returns a clone of the collection.- Overrides:
clonein classObject- Returns:
- A clone.
- Throws:
CloneNotSupportedException- if an item in the collection does not support cloning.
-
equals
Tests an object for equality with this instance.
-