/** * Set the point at the given index. * * @param column The location in the array, from 0 inclusive * to the array's {@linkplain #size} exclusive. * @param position The point to set at the given location in this array. * The point coordinates will be copied, i.e. changes to the given * {@code position} after the method call will not be reflected * to this array. * @throws IndexOutOfBoundsException if the index is out of bounds. * * @see List#set */ public void setDirectPosition(int column, DirectPosition position) throws IndexOutOfBoundsException { DirectPosition thisPosition = (DirectPosition) get(column); DirectPosition otherPosition = position.getDirectPosition(); for (int i = 0; i < thisPosition.getDimension(); i++) { thisPosition.setOrdinate(i, otherPosition.getOrdinate(i)); } invalidateCachedJTSPeer(); }
/** * Set the point at the given index. * * @param column The location in the array, from 0 inclusive * to the array's {@linkplain #size} exclusive. * @param position The point to set at the given location in this array. * The point coordinates will be copied, i.e. changes to the given * {@code position} after the method call will not be reflected * to this array. * @throws IndexOutOfBoundsException if the index is out of bounds. * * @see List#set */ @Override public void setDirectPosition(final int column, final DirectPosition position) throws IndexOutOfBoundsException { DirectPosition thisPosition = (DirectPosition) get(column); DirectPosition otherPosition = position.getDirectPosition(); for (int i = 0; i < thisPosition.getDimension(); i++) { thisPosition.setOrdinate(i, otherPosition.getOrdinate(i)); } invalidateCachedJTSPeer(); }