Skip to content

Commit

Permalink
Default impl. for HashingSegmentHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
jonherrmann committed Oct 29, 2018
1 parent d95265f commit 2ca4554
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ public interface HashingSegmentHandler {

void coordinate2d(final double x, final double y, final long hash, final long location, final int type);

void coordinates2d(final double[] coordinates, final long hashesAndLocations[], final int type);
default void coordinates2d(final double[] coordinates, final long hashesAndLocations[], final int type) {
for (int i = 0; i < coordinates.length; i += 2) {
coordinate2d(coordinates[i], coordinates[i + 1], hashesAndLocations[i], hashesAndLocations[i + 1], type);
}
}

void nextGeometricObject();
}

0 comments on commit 2ca4554

Please sign in to comment.