@Test public void testGetBandIndex() throws Exception { assertEquals(8, SmileCorrectionUtils.getSourceBandIndex("band_08")); assertEquals(-1, SmileCorrectionUtils.getSourceBandIndex("band")); assertEquals(9, SmileCorrectionUtils.getSourceBandIndex("09band")); assertEquals(5, SmileCorrectionUtils.getSourceBandIndex("Bla05band")); assertEquals(15, SmileCorrectionUtils.getSourceBandIndex("Bla15band")); assertEquals(21, SmileCorrectionUtils.getSourceBandIndex("taur_21")); }
public static int getSourceBandIndex(String name) { Matcher matcher = Pattern.compile("(\\d+)").matcher(name); if (!matcher.find()) { return -1; } String group = matcher.group(0); return Integer.parseInt(group); }
SmileCorrectionUtils { public static int getSourceBandIndex(String name) { Matcher matcher = Pattern.compile("(\\d+)").matcher(name); if (!matcher.find()) { return -1; } String group = matcher.group(0); return Integer.parseInt(group); } }
SmileCorrectionUtils { public static int getSourceBandIndex(String name) { Matcher matcher = Pattern.compile("(\\d+)").matcher(name); if (!matcher.find()) { return -1; } String group = matcher.group(0); return Integer.parseInt(group); }  }
SmileCorrectionUtils { public static int getSourceBandIndex(String name) { Matcher matcher = Pattern.compile("(\\d+)").matcher(name); if (!matcher.find()) { return -1; } String group = matcher.group(0); return Integer.parseInt(group); }  static float[] multiple2ArrayFloat(float[] array1, float[] array2); static float[] multiple3ArrayFloat(float[] array1, float[] array2, float[] array3); static float[] add2ArrayFloat(float[] array1, float[] array2); static double[] convertDegreesToRadians(double[] angle); static float[] convertDegreesToRadians(float[] angle); static double[] getAirMass(double[] cosOZARads, double[] cosSZARads); static double[] getAziDiff(double[] saaRads, double[] aooRads); static double[] getSampleDoubles(Tile sourceTile); static float[] getSampleFloats(Tile sourceTile); static int getSourceBandIndex(String name); static Sensor getSensorType(Product sourceProduct); }
SmileCorrectionUtils { public static int getSourceBandIndex(String name) { Matcher matcher = Pattern.compile("(\\d+)").matcher(name); if (!matcher.find()) { return -1; } String group = matcher.group(0); return Integer.parseInt(group); }  static float[] multiple2ArrayFloat(float[] array1, float[] array2); static float[] multiple3ArrayFloat(float[] array1, float[] array2, float[] array3); static float[] add2ArrayFloat(float[] array1, float[] array2); static double[] convertDegreesToRadians(double[] angle); static float[] convertDegreesToRadians(float[] angle); static double[] getAirMass(double[] cosOZARads, double[] cosSZARads); static double[] getAziDiff(double[] saaRads, double[] aooRads); static double[] getSampleDoubles(Tile sourceTile); static float[] getSampleFloats(Tile sourceTile); static int getSourceBandIndex(String name); static Sensor getSensorType(Product sourceProduct);  }