SEAGrid implements PlanetaryGrid { @Override public int getNumRows() { return numRows; } SEAGrid();  SEAGrid(int numRows); static int computeRowCount(double res); @Override int getNumRows(); @Override int getNumCols(int row); @Override long getNumBins(); @Override long getFirstBinIndex(int row); @Override double getCenterLat(int row); @Override long getBinIndex(double lat, double lon); @Override int getRowIndex(long binIndex); @Override double[] getCenterLatLon(long binIndex); double getCenterLon(int row, int col); int getColIndex(double lon, int row); int getRowIndex(double lat); static final int DEFAULT_NUM_ROWS; static double RE; }
@Test public void testConstructors() { SEAGrid grid = new SEAGrid(); assertEquals(2160, grid.getNumRows()); grid = new SEAGrid(2); assertEquals(2, grid.getNumRows()); try { new SEAGrid(1); fail("IAE expected"); } catch (IllegalArgumentException e) { } try { new SEAGrid(0); fail("IAE expected"); } catch (IllegalArgumentException e) { } try { new SEAGrid(-1); fail("IAE expected"); } catch (IllegalArgumentException e) { } try { new SEAGrid(9); fail("IAE expected"); } catch (IllegalArgumentException e) { } }