math.geom2d.point
Class PointSets2D

java.lang.Object
  extended by math.geom2d.point.PointSets2D

public class PointSets2D
extends java.lang.Object

A set of static methods for manipulating point sets.

Since:
0.9.1
Author:
dlegland

Constructor Summary
PointSets2D()
           
 
Method Summary
static
<T extends Point2D>
int
countMultipleVertices(java.util.List<T> points)
          Counts the number of multiple vertices in this point list.
static
<T extends Point2D>
int
countMultipleVertices(java.util.List<T> points, boolean closed)
          Counts the number of multiple vertices in this point list.
static
<T extends Point2D>
java.util.List<T>
filterMultipleVertices(java.util.List<T> vertices)
           
static
<T extends Point2D>
java.util.List<T>
filterMultipleVertices(java.util.List<T> vertices, boolean closed)
           
static
<T extends Point2D>
boolean
hasMultipleVertices(java.util.List<T> points)
          Tests if the given list of points contains multiple vertices.
static
<T extends Point2D>
boolean
hasMultipleVertices(java.util.List<T> points, boolean closed)
          Tests if the given list of points contains multiple vertices.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointSets2D

public PointSets2D()
Method Detail

hasMultipleVertices

public static <T extends Point2D> boolean hasMultipleVertices(java.util.List<T> points)
Tests if the given list of points contains multiple vertices. This function can be used to test presence of multiple vertices in polylines and polygons. First and last point are not compared.


hasMultipleVertices

public static <T extends Point2D> boolean hasMultipleVertices(java.util.List<T> points,
                                                              boolean closed)
Tests if the given list of points contains multiple vertices. This function can be used to test presence of multiple vertices in polylines and polygons. First and last point are compared if flag 'closed' is set to true.


countMultipleVertices

public static <T extends Point2D> int countMultipleVertices(java.util.List<T> points)
Counts the number of multiple vertices in this point list.


countMultipleVertices

public static <T extends Point2D> int countMultipleVertices(java.util.List<T> points,
                                                            boolean closed)
Counts the number of multiple vertices in this point list. If flag 'closed' is set to true, extremities are also compared.


filterMultipleVertices

public static <T extends Point2D> java.util.List<T> filterMultipleVertices(java.util.List<T> vertices)

filterMultipleVertices

public static <T extends Point2D> java.util.List<T> filterMultipleVertices(java.util.List<T> vertices,
                                                                           boolean closed)