1 /* file : ClosedPolyline2D.java 2 * 3 * Project : geometry 4 * 5 * =========================================== 6 * 7 * This library is free software; you can redistribute it and/or modify it 8 * under the terms of the GNU Lesser General Public License as published by 9 * the Free Software Foundation, either version 2.1 of the License, or (at 10 * your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, but 13 * WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY 14 * or FITNESS FOR A PARTICULAR PURPOSE. 15 * 16 * See the GNU Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public License 19 * along with this library. if not, write to : 20 * The Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 * Boston, MA 02111-1307, USA. 22 * 23 * Created on 16 avr. 2007 24 * 25 */ 26 27 package math.geom2d.polygon; 28 29 import java.util.ArrayList; 30 import java.util.Collection; 31 32 import math.geom2d.Point2D; 33 34 /** 35 * <p> 36 * A Ring2D is a Polyline2D whose last point is connected to the first one. 37 * This is typically the boundary of a SimplePolygon2D. 38 * </p> 39 * <p> 40 * The name 'Ring2D' was used for 2 reasons: 41 * <ul><li>it is short</li> <li>it is consistent with the JTS name</li></ul> 42 * </p> 43 * @deprecated replaced by LinearRing2D (0.8.0) 44 * @author dlegland 45 */ 46 @Deprecated 47 public class Ring2D extends LinearRing2D { 48 /** 49 * @deprecated Use LinearRing2D instead (0.8.0) 50 */ 51 @Deprecated 52 public Ring2D() { 53 super(); 54 } 55 56 /** 57 * @deprecated Ring2D will be changed to an interface in a future release. 58 * Use LinearRing2D instead (0.8.0) 59 */ 60 @Deprecated 61 public Ring2D(Point2D initialPoint) { 62 super(initialPoint); 63 } 64 65 /** 66 * @deprecated Ring2D will be changed to an interface in a future release. 67 * Use LinearRing2D instead (0.8.0) 68 */ 69 @Deprecated 70 public Ring2D(Point2D[] points) { 71 super(points); 72 } 73 74 /** 75 * @deprecated Ring2D will be changed to an interface in a future release. 76 * Use LinearRing2D instead (0.8.0) 77 */ 78 @Deprecated 79 public Ring2D(double[] xcoords, double[] ycoords) { 80 super(xcoords, ycoords); 81 } 82 83 /** 84 * @deprecated Ring2D will be changed to an interface in a future release. 85 * Use LinearRing2D instead (0.8.0) 86 */ 87 @Deprecated 88 public Ring2D(Collection<? extends Point2D> points) { 89 super(points); 90 } 91 92 @Override 93 public Ring2D clone() { 94 ArrayList<Point2D> array = new ArrayList<Point2D>(points.size()); 95 for(Point2D point : points) 96 array.add(point.clone()); 97 return new Ring2D(array); 98 } 99 }