Class ImmutableGeomFactory<S extends Segment1D<?,​?>>

    • Method Detail

      • convertToPoint

        public ImmutablePoint1D<S> convertToPoint​(Point1D<?,​?,​?> pt)
        Description copied from interface: GeomFactory1D
        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 ImmutablePoint1D<S> convertToPoint​(Vector1D<?,​?,​?> v)
        Description copied from interface: GeomFactory1D
        Convert the given vector if it is not of the right type.
        Parameters:
        v - the point to convert.
        Returns:
        the point.
      • convertToVector

        public ImmutableVector1D<S> convertToVector​(Point1D<?,​?,​?> pt)
        Description copied from interface: GeomFactory1D
        Convert the given point.
        Parameters:
        pt - the point to convert.
        Returns:
        the vector.
      • convertToVector

        public ImmutableVector1D<S> convertToVector​(Vector1D<?,​?,​?> v)
        Description copied from interface: GeomFactory1D
        Convert the given vector.
        Parameters:
        v - the vector to convert.
        Returns:
        the vector.
      • newPoint

        public ImmutablePoint1D<S> newPoint​(Segment1D<?,​?> segment)
        Description copied from interface: GeomFactory1D
        Create a point.
        Parameters:
        segment - the segment.
        Returns:
        the point.
      • newPoint

        public ImmutablePoint1D<S> newPoint​(Segment1D<?,​?> segment,
                                            double x,
                                            double y)
        Description copied from interface: GeomFactory1D
        Create a point.
        Parameters:
        segment - the segment.
        x - x coordinate of the point.
        y - y coordinate of the point.
        Returns:
        the point.
      • newPoint

        public ImmutablePoint1D<S> newPoint​(Segment1D<?,​?> segment,
                                            int x,
                                            int y)
        Description copied from interface: GeomFactory1D
        Create a point.
        Parameters:
        segment - the segment.
        x - x coordinate of the point.
        y - y coordinate of the point.
        Returns:
        the point.
      • newVector

        public ImmutableVector1D<S> newVector​(Segment1D<?,​?> segment)
        Description copied from interface: GeomFactory1D
        Create a vector.
        Parameters:
        segment - the segment.
        Returns:
        the vector.
      • newVector

        public ImmutableVector1D<S> newVector​(Segment1D<?,​?> segment,
                                              double x,
                                              double y)
        Description copied from interface: GeomFactory1D
        Create a vector.
        Parameters:
        segment - the segment.
        x - x coordinate of the vector.
        y - y coordinate of the vector.
        Returns:
        the vector.
      • newVector

        public ImmutableVector1D<S> newVector​(Segment1D<?,​?> segment,
                                              int x,
                                              int y)
        Description copied from interface: GeomFactory1D
        Create a vector.
        Parameters:
        segment - the segment.
        x - x coordinate of the vector.
        y - y coordinate of the vector.
        Returns:
        the vector.