Interface GeomFactory2D<V extends Vector2D<? super V,​? super P>,​P extends Point2D<? super P,​? super V>>

    • Method Detail

      • convertToPoint

        @Pure
        P convertToPoint​(Point2D<?,​?> pt)
        Convert the given point if it is not of the right type.
        Parameters:
        pt - the point to convert.
        Returns:
        p if it is of type P, or a copy of p.
      • convertToPoint

        @Pure
        P convertToPoint​(Vector2D<?,​?> vector)
        Convert the given vector.
        Parameters:
        vector - the vector to convert.
        Returns:
        the point.
      • convertToVector

        @Pure
        V convertToVector​(Point2D<?,​?> pt)
        Convert the given point.
        Parameters:
        pt - the point to convert.
        Returns:
        the vector.
      • convertToVector

        @Pure
        V convertToVector​(Vector2D<?,​?> vector)
        Convert the given vector.
        Parameters:
        vector - the vector to convert.
        Returns:
        the vector.
      • newPoint

        @Pure
        P newPoint()
        Create a point.
        Returns:
        the point.
      • newPoint

        @Pure
        P newPoint​(double x,
                   double y)
        Create a point.
        Parameters:
        x - x coordinate of the point.
        y - y coordinate of the point.
        Returns:
        the point.
      • newPoint

        @Pure
        P newPoint​(int x,
                   int y)
        Create a point.
        Parameters:
        x - x coordinate of the point.
        y - y coordinate of the point.
        Returns:
        the point.
      • newVector

        @Pure
        V newVector()
        Create a vector.
        Returns:
        the vector.
      • newVector

        @Pure
        V newVector​(double x,
                    double y)
        Create a vector.
        Parameters:
        x - x coordinate of the vector.
        y - y coordinate of the vector.
        Returns:
        the vector.
      • newVector

        @Pure
        V newVector​(int x,
                    int y)
        Create a vector.
        Parameters:
        x - x coordinate of the vector.
        y - y coordinate of the vector.
        Returns:
        the vector.