src/main/java/chalmers/pimp/model/pixeldata/RasterDataImpl.java
private void ensureInRange(int x, int y) {
    if (isBadCoordinate(x, y)) {
      throw new IndexOutOfBoundsException("Bad coordinate: (" + x + ", " + y + ")");
    }
  }
/**
   * Check if the specified coordinate is valid, throws an exception otherwise.
   *
   * @param x the x-coordinate that will be checked (zero-indexed).
   * @param y the y-coordinate that will be checked (zero-indexed).
   * @throws IndexOutOfBoundsException if the supplied coordinate is out-of-bounds.
   */
Check if the specified coordinate is valid, throws an exception otherwise.
@param x the x-coordinate that will be checked (zero-indexed).
@param y the y-coordinate that will be checked (zero-indexed).
@throws IndexOutOfBoundsException if the supplied coordinate is out-of-bounds.
Check if the specified coordinate is valid throws an exception otherwise . @param x the x - coordinate that will be checked ( zero - indexed ) . @param y the y - coordinate that will be checked ( zero - indexed ) . @throws IndexOutOfBoundsException if the supplied coordinate is out - of - bounds .
private void ensureInRange(int x, int y) {
    if (isBadCoordinate(x, y)) {
      throw new IndexOutOfBoundsException("Bad coordinate: (" + x + ", " + y + ")");
    }
  }
private void ensureInRange ( int x , int y ) { if ( isBadCoordinate ( x , y ) ) { throw new IndexOutOfBoundsException ( "Bad coordinate: (" + x + ", " + y + ")" ) ; } }
Check if the specified coordinate is valid, throws an exception otherwise.
Check if the specified coordinate is valid throws an exception otherwise .