Exemple #1
0
  public boolean bordersPoint2D(Point2D Point2D) {
    boolean borders = false;

    Iterator<Point2D> it = point2Ds.iterator();
    for (int i = 0; i < length; i++) {
      Point2D point = it.next();
      if (point.equals(Point2D)) {
        borders = true;
      }
    }
    return borders;
  }
Exemple #2
0
 private void convertPointsToArrays() {
   final int length = point2Ds.size();
   if (x == null || x.length != length) {
     x = new double[length];
     y = new double[length];
   }
   Iterator<Point2D> it = point2Ds.iterator();
   for (int i = 0; i < length; i++) {
     final Point2D point = it.next();
     x[i] = point.getX();
     y[i] = point.getY();
   }
 }