Commit cd241985 authored by Nico Mack's avatar Nico Mack

Minor API changed to ensure backward compatibility

parent 6db84bf4
......@@ -118,7 +118,7 @@ public class Cluster<T extends Positionable> {
// ---------------------------------------------------------------------------
public List<Point> getPositions() {
public Collection<Point> getPositions() {
List<Point> positions = new ArrayList<>();
this.points.forEach(point -> positions.add(point.getPosition()));
return positions;
......
......@@ -41,6 +41,7 @@ import java.awt.geom.Rectangle2D;
import java.awt.geom.RoundRectangle2D;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
......@@ -1193,7 +1194,7 @@ public class ShapeUtils {
*/
// ---------------------------------------------------------------------------
public static Path2D alphaShape(List<Point> pointCloud, double alpha, double smoothing, int iterations) {
public static Path2D alphaShape(Collection<Point> pointCloud, double alpha, double smoothing, int iterations) {
List<TriangulationPoint> polyPoints = new ArrayList<>(pointCloud.size());
for (Point point : pointCloud) {
polyPoints.add(new TPoint(Math.floor(point.getX()), Math.floor(point.getY())));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment