com.ijchart.xychart.tickunit
Class LongTickUnit

java.lang.Object
  extended by com.ijchart.xychart.tickunit.LongTickUnit
All Implemented Interfaces:
INumberTickUnit, java.io.Serializable, java.lang.Cloneable

public class LongTickUnit
extends java.lang.Object
implements INumberTickUnit, java.lang.Cloneable, java.io.Serializable

Title: IJChart

Description: a chart library for the Java(tm) platform.

Calculate the tick unit for number data and all values is long integer.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.
See Also:
Serialized Form

Constructor Summary
LongTickUnit()
           A default constructor.
LongTickUnit(long step)
           A constructor.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of the object.
 boolean equals(java.lang.Object obj)
           Tests the axis for equality with an arbitrary object.
 java.lang.String[] getTickUnits(double minValue, double maxValue, int maxCount, boolean includeZero)
           According to the minimum and maximum data and the largest number of coordinates to determine the scale of axis,all values are long.
 int hashCode()
           Returns a hash code value for the object.
 java.lang.String toString()
           Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LongTickUnit

public LongTickUnit()
A default constructor.


LongTickUnit

public LongTickUnit(long step)
A constructor.

Parameters:
step - long The step.
Method Detail

getTickUnits

public java.lang.String[] getTickUnits(double minValue,
                                       double maxValue,
                                       int maxCount,
                                       boolean includeZero)
According to the minimum and maximum data and the largest number of coordinates to determine the scale of axis,all values are long.

Specified by:
getTickUnits in interface INumberTickUnit
Parameters:
minValue - double The minimum value.
maxValue - double The max value.
maxCount - int The maximum count of tick units (must great than 0).
includeZero - boolean A boolean flag indicates whether or not include zero value.
Returns:
String[] An array of tick units,the values are sorted ascending. All elements in array is number (never null).

equals

public boolean equals(java.lang.Object obj)
Tests the axis for equality with an arbitrary object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object (null permitted).
Returns:
true or false.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a clone of the object.

Overrides:
clone in class java.lang.Object
Returns:
A clone.
Throws:
java.lang.CloneNotSupportedException - if some component of the axis does not support cloning.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class java.lang.Object
Returns:
A hash code value for this object.

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of the object.