Package com.qfs.dic
Interface IPoint
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
Point
Interface of an immutable point, expressed by its integer coordinates. For performance reasons
implementations may give access to their internal int array. This array should never be modified.
- Author:
- ActiveViam
-
Method Summary
Modifier and TypeMethodDescriptionintgetCoordinate(int position) Returns the coordinate at this position.int[]Returns array of coordinates.intlength()Returns the length of the point (number of coordinates).voidtransferCoordinates(int[] coordinates) Transfer the coordinates of the point into a receiver coordinate array.voidtransferCoordinates(int[] filter, int[] coordinates) Transfer some filtered coordinates of the point into a receiver coordinate array.
-
Method Details
-
length
int length()Returns the length of the point (number of coordinates). -
getCoordinate
int getCoordinate(int position) Returns the coordinate at this position. -
getCoordinates
int[] getCoordinates()Returns array of coordinates. -
transferCoordinates
void transferCoordinates(int[] coordinates) Transfer the coordinates of the point into a receiver coordinate array. The receiver array must have the same length than the point. -
transferCoordinates
void transferCoordinates(int[] filter, int[] coordinates) Transfer some filtered coordinates of the point into a receiver coordinate array. The receiver array must have the same length than the filter.- Parameters:
coordinates- receiver array
-