getCoordinates method

List<Coordinate> getCoordinates()

Return the subsequence of coordinates forming this chain. Allocates a new array to hold the Coordinates

Implementation

List<Coordinate> getCoordinates() {
  List<Coordinate> coord = []; //..length = end - start + 1;
  // int index = 0;
  for (int i = start; i <= end; i++) {
    coord.add(pts[i]);
    // coord[index++] = pts[i];
  }
  return coord;
}