Interface Point

All Known Subinterfaces:
Point2d, Point3d

public interface Point
A representation of an n-dimensional point. The dimension of the point is the length of the array returned by the getLocation() method.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    Returns either a new array or internal temporary array with a copy of the data or a direct reference to the array.
    void
    setLocation(double[] p)
    Sets the location of the point.
  • Method Details

    • setLocation

      void setLocation(double[] p)
      Sets the location of the point. Some implementations may copy the values of the array or may set the internal reference to the array. Some implementations may check the length of the array or the values. If the values need to be restricted, then the getLocation() method should return a copy of the data.
    • getLocation

      double[] getLocation()
      Returns either a new array or internal temporary array with a copy of the data or a direct reference to the array. In the case where a copy is returned and later modified, the setLocation must be called to apply the data. The values in the returned array must represent the absolute location of the point.