public interface IMutablePoint extends IPoint
This interface provides read and write access to the coordinates. It adds write access to the read only interface
IPoint
.
IPoint
,
MutablePoint
Modifier and Type | Method and Description |
---|---|
double |
getX()
Gets the x coordinate for this point.
|
double |
getY()
Gets the y coordinate for this point.
|
default void |
relocate(double x,
double y)
Sets the coordinates of the point to the given values.
|
default void |
relocate(IPoint location)
Sets the coordinates of the point to the given values.
|
default void |
relocate(PointD location)
Sets the coordinates of the point to the given values.
|
void |
setX(double value)
Sets the x coordinate for this point.
|
void |
setY(double value)
Sets the y coordinate for this point.
|
distanceTo, toPointD
double getX()
Implementations may adjust the coordinates internally, e.g. to automatically snap the coordinates to grid points. So depending on context the value that can be read might not necessarily be the exact same value that has just been written.
getX
in interface IPoint
IPoint.getX()
,
setX(double)
double getY()
Implementations may adjust the coordinates internally, e.g. to automatically snap the coordinates to grid points. So depending on context the value that can be read might not necessarily be the exact same value that has just been written.
getY
in interface IPoint
IPoint.getY()
,
setY(double)
default void relocate(double x, double y)
x
- The new x coordinatey
- The new y coordinatedefault void relocate(IPoint location)
location
- The new location.default void relocate(PointD location)
location
- The new location.void setX(double value)
Implementations may adjust the coordinates internally, e.g. to automatically snap the coordinates to grid points. So depending on context the value that can be read might not necessarily be the exact same value that has just been written.
value
- The X to set.IPoint.getX()
,
getX()
void setY(double value)
Implementations may adjust the coordinates internally, e.g. to automatically snap the coordinates to grid points. So depending on context the value that can be read might not necessarily be the exact same value that has just been written.
value
- The Y to set.IPoint.getY()
,
getY()