public class PolygonReal2D extends java.lang.Object implements java.lang.Iterable<PointReal2D>
Constructor and Description |
---|
PolygonReal2D()
Creates an empty polygon
|
PolygonReal2D(java.util.List<PointReal2D> points)
Wraps the given List into a Polygon
|
PolygonReal2D(PointReal2D... points)
Creates a polygon consisting of the given points
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
void |
forEach(java.util.function.Consumer<? super PointReal2D> action) |
java.util.List<PointReal2D> |
getPoints()
Returns the list of points on the polygon
|
int |
hashCode() |
java.util.Iterator<PointReal2D> |
iterator() |
void |
setPoints(java.util.List<PointReal2D> points)
Sets the list of points on the polygon
|
java.util.Spliterator<PointReal2D> |
spliterator() |
java.lang.String |
toString() |
public PolygonReal2D()
public PolygonReal2D(java.util.List<PointReal2D> points)
points
- list of points that will make up the polygonpublic PolygonReal2D(PointReal2D... points)
points
- the points that will make up the polygonpublic java.util.List<PointReal2D> getPoints()
public void setPoints(java.util.List<PointReal2D> points)
points
- the list of points on the polygonpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Iterator<PointReal2D> iterator()
iterator
in interface java.lang.Iterable<PointReal2D>
public void forEach(java.util.function.Consumer<? super PointReal2D> action)
forEach
in interface java.lang.Iterable<PointReal2D>
public java.util.Spliterator<PointReal2D> spliterator()
spliterator
in interface java.lang.Iterable<PointReal2D>