Package org.jfree.data.xy
Class XYCoordinate
- java.lang.Object
-
- org.jfree.data.xy.XYCoordinate
-
- All Implemented Interfaces:
Serializable
,Comparable
public class XYCoordinate extends Object implements Comparable, Serializable
Represents an (x, y) coordinate.- Since:
- 1.0.6
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XYCoordinate()
Creates a new coordinate for the point (0.0, 0.0).XYCoordinate(double x, double y)
Creates a new coordinate for the point (x, y).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Object obj)
Compares this instance against an arbitrary object.boolean
equals(Object obj)
Tests this coordinate for equality with an arbitrary object.double
getX()
Returns the x-coordinate.double
getY()
Returns the y-coordinate.int
hashCode()
Returns a hash code for this instance.String
toString()
Returns a string representation of this instance, primarily for debugging purposes.
-
-
-
Method Detail
-
getX
public double getX()
Returns the x-coordinate.- Returns:
- The x-coordinate.
-
getY
public double getY()
Returns the y-coordinate.- Returns:
- The y-coordinate.
-
equals
public boolean equals(Object obj)
Tests this coordinate for equality with an arbitrary object.
-
hashCode
public int hashCode()
Returns a hash code for this instance.
-
toString
public String toString()
Returns a string representation of this instance, primarily for debugging purposes.
-
compareTo
public int compareTo(Object obj)
Compares this instance against an arbitrary object.- Specified by:
compareTo
in interfaceComparable
- Parameters:
obj
- the object (null
not permitted).- Returns:
- An integer indicating the relative order of the items.
-
-