Interface Point

All Superinterfaces:
Serializable
All Known Subinterfaces:
Point.X, Point.Y, Point.Z
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Point extends Serializable
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Represents any value of X along the X coordinate plane.
    static interface 
    Represents any value of Y along the Y coordinate plane.
    static interface 
    Represents any value of Z along the Z coordinate plane.
  • Method Summary

    Modifier and Type
    Method
    Description
    default double
    add(double point)
    Adds the given point to this point.
    default double
    add(Point point)
    Adds the given point to this point.
    default double
    distance(double point)
    Returns the distance between this point and the given point.
    default double
    distance(Point point)
    Returns the distance between this point and the given point.
    default double
    divide(double point)
    Divides this point by the given point.
    default double
    divide(Point point)
    Divides this point by the given point.
    static IPoint2D
    fromDouble(double x, double z)
    Creates a 2d point from the given double values.
    static IPoint3D
    fromDouble(double x, double y, double z)
    Creates a 3d point from the given double values.
    static IPoint3D
    Creates a 3d point from a given X, Y, and Z value.
    static IPoint2D
    Creates a 2d point from a given X and Z value.
    double
    get()
    Returns the numerical representation of the point.
    default double
    integ(double point, double subIntervals, DoubleUnaryOperator function)
    Returns the integral of the given function from this point to the given point.
    default double
    integ(Point point, double subIntervals, DoubleUnaryOperator function)
    Returns the integral of the given function from this point to the given point.
    default double
    multiply(double point)
    Multiplies this point by the given point.
    default double
    multiply(Point point)
    Multiplies this point by the given point.
    default double
    power(double point)
    Returns this point raised to the power of the given point.
    default double
    power(Point point)
    Returns this point raised to the power of the given point.
    default double
    subtract(double point)
    Subtracts the given point from this point.
    default double
    subtract(Point point)
    Subtracts the given point from this point.
     
  • Method Details

    • fromXZ

      static IPoint2D fromXZ(Point.X x, Point.Z z)
      Creates a 2d point from a given X and Z value.
      Parameters:
      x - The X value.
      z - The Z value.
      Returns:
      The 2d point.
    • fromXYZ

      static IPoint3D fromXYZ(Point.X x, Point.Y y, Point.Z z)
      Creates a 3d point from a given X, Y, and Z value.
      Parameters:
      x - The X value.
      y - The Y value.
      z - The Z value.
      Returns:
      The 3d point.
    • fromDouble

      static IPoint2D fromDouble(double x, double z)
      Creates a 2d point from the given double values.
      Parameters:
      x - The X value.
      z - The Z value.
      Returns:
      The 2d point.
    • fromDouble

      static IPoint3D fromDouble(double x, double y, double z)
      Creates a 3d point from the given double values.
      Parameters:
      x - The X value.
      y - The Y value.
      z - The Z value.
      Returns:
      The 3d point.
    • toString

      String toString()
      Overrides:
      toString in class Object
    • get

      double get()
      Returns the numerical representation of the point.
      Returns:
      The value of the point.
    • distance

      default double distance(double point)
      Returns the distance between this point and the given point.
      Parameters:
      point - The point to compare to.
      Returns:
      The distance between the two points.
    • distance

      default double distance(Point point)
      Returns the distance between this point and the given point.
      Parameters:
      point - The point to compare to.
      Returns:
      The distance between the two points.
    • add

      default double add(double point)
      Adds the given point to this point.
      Parameters:
      point - The point to add.
      Returns:
      The sum of the two points.
    • add

      default double add(Point point)
      Adds the given point to this point.
      Parameters:
      point - The point to add.
      Returns:
      The sum of the two points.
    • subtract

      default double subtract(double point)
      Subtracts the given point from this point.
      Parameters:
      point - The point to subtract.
      Returns:
      The difference of the two points.
    • subtract

      default double subtract(Point point)
      Subtracts the given point from this point.
      Parameters:
      point - The point to subtract.
      Returns:
      The difference of the two points.
    • multiply

      default double multiply(double point)
      Multiplies this point by the given point.
      Parameters:
      point - The point to multiply by.
      Returns:
      The product of the two points.
    • multiply

      default double multiply(Point point)
      Multiplies this point by the given point.
      Parameters:
      point - The point to multiply by.
      Returns:
      The product of the two points.
    • divide

      default double divide(double point)
      Divides this point by the given point.
      Parameters:
      point - The point to divide by.
      Returns:
      The quotient of the two points.
    • divide

      default double divide(Point point)
      Divides this point by the given point.
      Parameters:
      point - The point to divide by.
      Returns:
      The quotient of the two points.
    • power

      default double power(double point)
      Returns this point raised to the power of the given point.
      Parameters:
      point - The point to raise this point to.
      Returns:
      The power of the two points.
    • power

      default double power(Point point)
      Returns this point raised to the power of the given point.
      Parameters:
      point - The point to raise this point to.
      Returns:
      The power of the two points.
    • integ

      default double integ(double point, double subIntervals, DoubleUnaryOperator function)
      Returns the integral of the given function from this point to the given point.
      Parameters:
      point - The point to integrate to.
      subIntervals - The number of sub-intervals to use.
      function - The function to integrate.
      Returns:
      The integral of the function.
    • integ

      default double integ(Point point, double subIntervals, DoubleUnaryOperator function)
      Returns the integral of the given function from this point to the given point.
      Parameters:
      point - The point to integrate to.
      subIntervals - The number of sub-intervals to use.
      function - The function to integrate.
      Returns:
      The integral of the function.