public Polygon(EdgeRing col) { points = new PointRing(); edges = new EdgeRing(col); if (!edges.loop()) throw new RuntimeException( "Can't construct " + this.getClass().getName() + " because edge list is not valid loop."); for (Segment2D edge : edges) points.add(edge.getStart()); check(); }