@Test public void testGetOrdinate() { CoordinateSequence2D cs = new CoordinateSequence2D(1.2, 3.4); assertEquals(1.2, cs.getOrdinate(0, 0), TOL); assertEquals(3.4, cs.getOrdinate(0, 1), TOL); }
public double getOrdinate(int index, int ordinateIndex) { switch (ordinateIndex) { case 0: return x[index]; case 1: return y[index]; default: throw new IllegalArgumentException("invalid ordinate index: " + ordinateIndex); } }
CoordinateSequence2D implements CoordinateSequence, Cloneable { public double getOrdinate(int index, int ordinateIndex) { switch (ordinateIndex) { case 0: return x[index]; case 1: return y[index]; default: throw new IllegalArgumentException("invalid ordinate index: " + ordinateIndex); } } }
CoordinateSequence2D implements CoordinateSequence, Cloneable { public double getOrdinate(int index, int ordinateIndex) { switch (ordinateIndex) { case 0: return x[index]; case 1: return y[index]; default: throw new IllegalArgumentException("invalid ordinate index: " + ordinateIndex); } } CoordinateSequence2D(int n);  CoordinateSequence2D(double... xy); }
CoordinateSequence2D implements CoordinateSequence, Cloneable { public double getOrdinate(int index, int ordinateIndex) { switch (ordinateIndex) { case 0: return x[index]; case 1: return y[index]; default: throw new IllegalArgumentException("invalid ordinate index: " + ordinateIndex); } } CoordinateSequence2D(int n);  CoordinateSequence2D(double... xy); int getDimension(); Coordinate getCoordinate(int index); Coordinate getCoordinateCopy(int index); void getCoordinate(int index, Coordinate coord); double getX(int index); double getY(int index); double getOrdinate(int index, int ordinateIndex); int size(); void setOrdinate(int index, int ordinateIndex, double value); void setX(int index, double value); void setY(int index, double value); void setXY(int index, double x, double y); Coordinate[] toCoordinateArray(); Envelope expandEnvelope(Envelope env); @Override Object clone(); CoordinateSequence copy(); }
CoordinateSequence2D implements CoordinateSequence, Cloneable { public double getOrdinate(int index, int ordinateIndex) { switch (ordinateIndex) { case 0: return x[index]; case 1: return y[index]; default: throw new IllegalArgumentException("invalid ordinate index: " + ordinateIndex); } } CoordinateSequence2D(int n);  CoordinateSequence2D(double... xy); int getDimension(); Coordinate getCoordinate(int index); Coordinate getCoordinateCopy(int index); void getCoordinate(int index, Coordinate coord); double getX(int index); double getY(int index); double getOrdinate(int index, int ordinateIndex); int size(); void setOrdinate(int index, int ordinateIndex, double value); void setX(int index, double value); void setY(int index, double value); void setXY(int index, double x, double y); Coordinate[] toCoordinateArray(); Envelope expandEnvelope(Envelope env); @Override Object clone(); CoordinateSequence copy();  }