Class ImmutableGeomFactory

    • Method Detail

      • convertToPoint

        public ImmutablePoint2D convertToPoint​(Point2D<?,​?> pt)
        Description copied from interface: GeomFactory2D
        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

        public ImmutablePoint2D convertToPoint​(Vector2D<?,​?> v)
        Description copied from interface: GeomFactory2D
        Convert the given vector.
        Parameters:
        v - the vector to convert.
        Returns:
        the point.
      • convertToVector

        public ImmutableVector2D convertToVector​(Point2D<?,​?> pt)
        Description copied from interface: GeomFactory2D
        Convert the given point.
        Parameters:
        pt - the point to convert.
        Returns:
        the vector.
      • convertToVector

        public ImmutableVector2D convertToVector​(Vector2D<?,​?> v)
        Description copied from interface: GeomFactory2D
        Convert the given vector.
        Parameters:
        v - the vector to convert.
        Returns:
        the vector.
      • newPoint

        public ImmutablePoint2D newPoint​(double x,
                                         double y)
        Description copied from interface: GeomFactory2D
        Create a point.
        Parameters:
        x - x coordinate of the point.
        y - y coordinate of the point.
        Returns:
        the point.
      • newPoint

        public ImmutablePoint2D newPoint​(int x,
                                         int y)
        Description copied from interface: GeomFactory2D
        Create a point.
        Parameters:
        x - x coordinate of the point.
        y - y coordinate of the point.
        Returns:
        the point.
      • newVector

        public ImmutableVector2D newVector​(double x,
                                           double y)
        Description copied from interface: GeomFactory2D
        Create a vector.
        Parameters:
        x - x coordinate of the vector.
        y - y coordinate of the vector.
        Returns:
        the vector.
      • newVector

        public ImmutableVector2D newVector​(int x,
                                           int y)
        Description copied from interface: GeomFactory2D
        Create a vector.
        Parameters:
        x - x coordinate of the vector.
        y - y coordinate of the vector.
        Returns:
        the vector.