JIDE 3.5.15

com.jidesoft.chart.model
Class AxisExtent

java.lang.Object
  extended by com.jidesoft.chart.model.AxisExtent
All Implemented Interfaces:
Comparable<AxisExtent>

public class AxisExtent
extends Object
implements Comparable<AxisExtent>

A value class used to indicate a range of values along an axis. (We can't use the word 'Range' in the name though, because it already has a specific meaning in terms of allowable values. This is different to an extent, which covers all values from the min to the max, rather than allowing one value in that range.)

Author:
Simon White (swhite@catalysoft.com)

Constructor Summary
AxisExtent(double minimum, double maximum)
          Create an AxisExtent instance using the supplied minimum and maximum values
AxisExtent(int minimum, int maximum)
          Create an AxisExtent instance using the supplied minimum and maximum values
 
Method Summary
 int compareTo(AxisExtent other)
          Compares this AxisExtent to another AxisExtent object by looking at the minimum value and, if equal, then the maximum value
 boolean equals(Object obj)
           
 double getMax()
          Returns the maximum value of a portion of an axis
 double getMin()
          Returns the minimum value of a portion of an axis
 int hashCode()
           
 double size()
          Returns the size of a portion of the axis.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AxisExtent

public AxisExtent(int minimum,
                  int maximum)
Create an AxisExtent instance using the supplied minimum and maximum values

Parameters:
minimum - the minimum value of the portion of the axis
maximum - the maximum value of the portion of the axis

AxisExtent

public AxisExtent(double minimum,
                  double maximum)
Create an AxisExtent instance using the supplied minimum and maximum values

Parameters:
minimum - the minimum value of the portion of the axis
maximum - the maximum value of the portion of the axis
Method Detail

getMin

public double getMin()
Returns the minimum value of a portion of an axis

Returns:
the minimum value of a portion of an axis

getMax

public double getMax()
Returns the maximum value of a portion of an axis

Returns:
the maximum value of a portion of an axis

size

public double size()
Returns the size of a portion of the axis. The result of this call is guaranteed to be non-negative.

Returns:
the size of a portion of the axis, computed as the maximum minus the minimum (or 0 if max < min, which should not be the case anyway)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(AxisExtent other)
Compares this AxisExtent to another AxisExtent object by looking at the minimum value and, if equal, then the maximum value

Specified by:
compareTo in interface Comparable<AxisExtent>

JIDE 3.5.15