@Test public void testSetOrdinate() { final SimpleDirectPosition pos = new SimpleDirectPosition(2); assertNull(pos.getCoordinateReferenceSystem()); assertEquals(2, pos.getDimension()); assertEquals(0.0, pos.getOrdinate(0), 0.0); assertEquals(0.0, pos.getOrdinate(1), 0.0); pos.setOrdinate(0, 4.0); pos.setOrdinate(1, 3.0); assertEquals(4.0, pos.getOrdinate(0), 0.0); assertEquals(3.0, pos.getOrdinate(1), 0.0); assertArrayEquals(new double[] {4.0, 3.0}, pos.getCoordinate(), 0.0); validate(pos); }
@Override public void setOrdinate(final int dimension, final double value) throws IndexOutOfBoundsException { ordinates[dimension] = value; }
SimpleDirectPosition implements DirectPosition, Serializable { @Override public void setOrdinate(final int dimension, final double value) throws IndexOutOfBoundsException { ordinates[dimension] = value; } }
SimpleDirectPosition implements DirectPosition, Serializable { @Override public void setOrdinate(final int dimension, final double value) throws IndexOutOfBoundsException { ordinates[dimension] = value; } SimpleDirectPosition(final int dimension);  SimpleDirectPosition(final CoordinateReferenceSystem crs);  SimpleDirectPosition(final CoordinateReferenceSystem crs, final double... ordinates);  SimpleDirectPosition(final DirectPosition position); }
SimpleDirectPosition implements DirectPosition, Serializable { @Override public void setOrdinate(final int dimension, final double value) throws IndexOutOfBoundsException { ordinates[dimension] = value; } SimpleDirectPosition(final int dimension);  SimpleDirectPosition(final CoordinateReferenceSystem crs);  SimpleDirectPosition(final CoordinateReferenceSystem crs, final double... ordinates);  SimpleDirectPosition(final DirectPosition position); @Override CoordinateReferenceSystem getCoordinateReferenceSystem(); @Override int getDimension(); @Override double[] getCoordinate(); @Override double getOrdinate(final int dimension); @Override void setOrdinate(final int dimension, final double value); @Override DirectPosition getDirectPosition(); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString(); }
SimpleDirectPosition implements DirectPosition, Serializable { @Override public void setOrdinate(final int dimension, final double value) throws IndexOutOfBoundsException { ordinates[dimension] = value; } SimpleDirectPosition(final int dimension);  SimpleDirectPosition(final CoordinateReferenceSystem crs);  SimpleDirectPosition(final CoordinateReferenceSystem crs, final double... ordinates);  SimpleDirectPosition(final DirectPosition position); @Override CoordinateReferenceSystem getCoordinateReferenceSystem(); @Override int getDimension(); @Override double[] getCoordinate(); @Override double getOrdinate(final int dimension); @Override void setOrdinate(final int dimension, final double value); @Override DirectPosition getDirectPosition(); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString(); final double[] ordinates; }