@Test public void testGetIncrementOffset() { final String test1 = "3,8"; final String test2 = "3,8,13,..."; IncrementOffset incrementOffset = ModisUtils.getIncrementOffset(test1); assertNotNull(incrementOffset); assertEquals(2, incrementOffset.offset); assertEquals(5, incrementOffset.increment); incrementOffset = ModisUtils.getIncrementOffset(test2); assertNotNull(incrementOffset); assertEquals(2, incrementOffset.offset); assertEquals(5, incrementOffset.increment); }
public static IncrementOffset getIncrementOffset(String attribute) { final IncrementOffset incrementOffset = new IncrementOffset(); final Range range = getRangeFromString(attribute); incrementOffset.offset = (int) (range.getMin() - 1); incrementOffset.increment = (int) (range.getMax() - range.getMin()); return incrementOffset; }
ModisUtils { public static IncrementOffset getIncrementOffset(String attribute) { final IncrementOffset incrementOffset = new IncrementOffset(); final Range range = getRangeFromString(attribute); incrementOffset.offset = (int) (range.getMin() - 1); incrementOffset.increment = (int) (range.getMax() - range.getMin()); return incrementOffset; } }
ModisUtils { public static IncrementOffset getIncrementOffset(String attribute) { final IncrementOffset incrementOffset = new IncrementOffset(); final Range range = getRangeFromString(attribute); incrementOffset.offset = (int) (range.getMin() - 1); incrementOffset.increment = (int) (range.getMax() - range.getMin()); return incrementOffset; }  }
ModisUtils { public static IncrementOffset getIncrementOffset(String attribute) { final IncrementOffset incrementOffset = new IncrementOffset(); final Range range = getRangeFromString(attribute); incrementOffset.offset = (int) (range.getMin() - 1); incrementOffset.increment = (int) (range.getMax() - range.getMin()); return incrementOffset; }  static String decodeBandName(String names, int layerIdx); static float[] decodeSpectralInformation(String bandExt, float[] recycle); static String extractValueForKey(String metaDataString, String key); static Date createDateFromStrings(final String date, final String time); static IncrementOffset getIncrementOffset(String attribute); static Range getRangeFromString(String rangeString); static String extractBandName(String variableName); }
ModisUtils { public static IncrementOffset getIncrementOffset(String attribute) { final IncrementOffset incrementOffset = new IncrementOffset(); final Range range = getRangeFromString(attribute); incrementOffset.offset = (int) (range.getMin() - 1); incrementOffset.increment = (int) (range.getMax() - range.getMin()); return incrementOffset; }  static String decodeBandName(String names, int layerIdx); static float[] decodeSpectralInformation(String bandExt, float[] recycle); static String extractValueForKey(String metaDataString, String key); static Date createDateFromStrings(final String date, final String time); static IncrementOffset getIncrementOffset(String attribute); static Range getRangeFromString(String rangeString); static String extractBandName(String variableName);  }