@Test public void testCreateRangeFromArray_inverseOrderedInts() { final Range range = ModisFileReader.createRangeFromArray(new int[]{9886, 14}); assertNotNull(range); assertEquals(14.0, range.getMin(), 1e-8); assertEquals(9886.0, range.getMax(), 1e-8); }
static Range createRangeFromArray(int[] rangeArray) { if (rangeArray != null && rangeArray.length >= 2) { final Range range = new Range(); range.setMin(rangeArray[0] < rangeArray[1] ? rangeArray[0] : rangeArray[1]); range.setMax(rangeArray[0] > rangeArray[1] ? rangeArray[0] : rangeArray[1]); return range; } return null; }
ModisFileReader { static Range createRangeFromArray(int[] rangeArray) { if (rangeArray != null && rangeArray.length >= 2) { final Range range = new Range(); range.setMin(rangeArray[0] < rangeArray[1] ? rangeArray[0] : rangeArray[1]); range.setMax(rangeArray[0] > rangeArray[1] ? rangeArray[0] : rangeArray[1]); return range; } return null; } }
ModisFileReader { static Range createRangeFromArray(int[] rangeArray) { if (rangeArray != null && rangeArray.length >= 2) { final Range range = new Range(); range.setMin(rangeArray[0] < rangeArray[1] ? rangeArray[0] : rangeArray[1]); range.setMax(rangeArray[0] > rangeArray[1] ? rangeArray[0] : rangeArray[1]); return range; } return null; } ModisFileReader(); }
ModisFileReader { static Range createRangeFromArray(int[] rangeArray) { if (rangeArray != null && rangeArray.length >= 2) { final Range range = new Range(); range.setMin(rangeArray[0] < rangeArray[1] ? rangeArray[0] : rangeArray[1]); range.setMax(rangeArray[0] > rangeArray[1] ? rangeArray[0] : rangeArray[1]); return range; } return null; } ModisFileReader(); void addRastersAndGeoCoding(final Product product, ModisGlobalAttributes globalAttribs, NetCDFVariables netCDFVariables); ModisBandReader getBandReader(final Band band); void close(); }
ModisFileReader { static Range createRangeFromArray(int[] rangeArray) { if (rangeArray != null && rangeArray.length >= 2) { final Range range = new Range(); range.setMin(rangeArray[0] < rangeArray[1] ? rangeArray[0] : rangeArray[1]); range.setMax(rangeArray[0] > rangeArray[1] ? rangeArray[0] : rangeArray[1]); return range; } return null; } ModisFileReader(); void addRastersAndGeoCoding(final Product product, ModisGlobalAttributes globalAttribs, NetCDFVariables netCDFVariables); ModisBandReader getBandReader(final Band band); void close();  }