Package quadbase.util
Class Position
java.lang.Object
quadbase.util.Position
This class contains methods to define and manipulate a 2D point on the chart. The coordinates are
floating point numbers and can represent a relative position in the main chart window.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the two points are the same or not.final floatgetX()Returns the x coordinate.final floatgetY()Returns the y coordinate.inthashCode()Returns the hashcode for the Position.final voidset(float x1, float y1) Set the x and y values.final voidsetX(float f) Set value of x.final voidsetY(float f) Set value of y.
-
Constructor Details
-
Position
public Position()Empty Constructor -
Position
public Position(float x1, float y1) Constructor
-
-
Method Details
-
getX
public final float getX()Returns the x coordinate.- Returns:
- The x coordinate.
-
getY
public final float getY()Returns the y coordinate.- Returns:
- The y coordinate.
-
setX
public final void setX(float f) Set value of x.- Parameters:
f- The x coordinate.
-
setY
public final void setY(float f) Set value of y.- Parameters:
f- The y coordinate.
-
set
public final void set(float x1, float y1) Set the x and y values.- Parameters:
x1- The x coordinate.y1- The y coordinate.
-
equals
Checks if the two points are the same or not.- Returns:
- true iff coordinates of both vertices are equal.
-
hashCode
public int hashCode()Returns the hashcode for the Position.
-