Class Polygon2D.Double

  • All Implemented Interfaces:
    Shape
    Enclosing class:
    Polygon2D

    public static class Polygon2D.Double
    extends Polygon2D
    The concrete Polygon class that stores coordinates internally as doubles.
    • Constructor Detail

      • Double

        public Double​(int size)
        Create a new polygon with space for the given number of vertices.
      • Double

        public Double​(double[] coords)
        Create a new polygon with the given vertices, in the format [x0, y0, x1, y1, ... ].
      • Double

        public Double()
        Create a new polygon with no coordinates
      • Double

        public Double​(double x,
                      double y)
        Create a new polygon with a single start point