Point

Inheritance: java.lang.Object

public final class Point

Represent point with fractional coordinates.

Constructors

ConstructorDescription
Point(double x, double y)Initializes new instance of the Point .

Methods

MethodDescription
getX()Gets X coordinate value.
setX(double value)Sets X coordinate value.
getY()Gets Y coordinate value.
setY(double value)Sets Y coordinate value.
getTrivial()Gets point with zero coordinates.
toPoint()Converts point into java.awt.geom.Point2D.Float object.
toString()Return string representation current point.

Point(double x, double y)

public Point(double x, double y)

Initializes new instance of the Point .

Parameters:

ParameterTypeDescription
xdoublex coordinate value.
ydoubley coordinate value.

getX()

public double getX()

Gets X coordinate value.

Returns: double - double value

setX(double value)

public void setX(double value)

Sets X coordinate value.

Parameters:

ParameterTypeDescription
valuedoubledouble value

getY()

public double getY()

Gets Y coordinate value.

Returns: double - double value

setY(double value)

public void setY(double value)

Sets Y coordinate value.

Parameters:

ParameterTypeDescription
valuedoubledouble value

getTrivial()

public static Point getTrivial()

Gets point with zero coordinates.

Returns: Point - Point object

toPoint()

public Point2D.Float toPoint()

Converts point into java.awt.geom.Point2D.Float object.

Returns: java.awt.geom.Point2D.Float - Float structure.

toString()

public String toString()

Return string representation current point.

Returns: java.lang.String - String, representing current point.