JIDE 3.5.15

com.jidesoft.chart.model
Class RealPosition

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

public class RealPosition
extends Object
implements Positionable

A simple implementation of Positionable


Constructor Summary
RealPosition()
           
RealPosition(double position)
          Create a RealPosition from the supplied position parameter
 
Method Summary
 int compareTo(Positionable o)
          This method enables RealPositions to be compared and sorted according to their position on the number line.
 boolean equals(Object obj)
           
 int hashCode()
           
 double position()
          Map the Positionable object to a numeric value (a double) so that it can be positioned on an axis.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RealPosition

public RealPosition()

RealPosition

public RealPosition(double position)
Create a RealPosition from the supplied position parameter

Parameters:
position - the position of the associated object as a double
Method Detail

position

public double position()
Map the Positionable object to a numeric value (a double) so that it can be positioned on an axis.

Specified by:
position in interface Positionable
Returns:
the position of the object

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(Positionable o)
This method enables RealPositions to be compared and sorted according to their position on the number line.

Specified by:
compareTo in interface Comparable<Positionable>
Parameters:
o - some other Positionable
Returns:
-1, 0, or 1 according to whether this object is considered to be less than, equal to or greater than the supplied object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

JIDE 3.5.15