Package org.jfree.data.xy
Class XYCoordinate
java.lang.Object
org.jfree.data.xy.XYCoordinate
- All Implemented Interfaces:
Serializable,Comparable
Represents an (x, y) coordinate.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates 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
Modifier and TypeMethodDescriptionintCompares this instance against an arbitrary object.booleanTests this coordinate for equality with an arbitrary object.doublegetX()Returns the x-coordinate.doublegetY()Returns the y-coordinate.inthashCode()Returns a hash code for this instance.toString()Returns a string representation of this instance, primarily for debugging purposes.
-
Constructor Details
-
XYCoordinate
public XYCoordinate()Creates a new coordinate for the point (0.0, 0.0). -
XYCoordinate
Creates a new coordinate for the point (x, y).- Parameters:
x- the x-coordinate.y- the y-coordinate.
-
-
Method Details
-
getX
Returns the x-coordinate.- Returns:
- The x-coordinate.
-
getY
Returns the y-coordinate.- Returns:
- The y-coordinate.
-
equals
Tests this coordinate for equality with an arbitrary object. -
hashCode
Returns a hash code for this instance. -
toString
Returns a string representation of this instance, primarily for debugging purposes. -
compareTo
Compares this instance against an arbitrary object.- Specified by:
compareToin interfaceComparable- Parameters:
obj- the object (nullnot permitted).- Returns:
- An integer indicating the relative order of the items.
-