@Test public void testInit() { final float[] cwRR = provider.getCentralWavelength("MER_RR"); assertEquals("925 members", 925, cwRR.length); assertEquals("value 0", 0f, cwRR[0], DIFF); assertEquals("value 1", 0f, cwRR[1], DIFF); assertEquals("value 924", 0f, cwRR[924], DIFF); }
public float[] getCentralWavelength(final String productType) { if (productType.startsWith("MER_RR")) { return centralWavelenthRr; } else if (productType.startsWith("MER_F")) { return generateCentralWavelengthFr(); } else { throw new IllegalArgumentException("'The product has an unsupported product type: " + productType); } }
CentralWavelengthProvider { public float[] getCentralWavelength(final String productType) { if (productType.startsWith("MER_RR")) { return centralWavelenthRr; } else if (productType.startsWith("MER_F")) { return generateCentralWavelengthFr(); } else { throw new IllegalArgumentException("'The product has an unsupported product type: " + productType); } } }
CentralWavelengthProvider { public float[] getCentralWavelength(final String productType) { if (productType.startsWith("MER_RR")) { return centralWavelenthRr; } else if (productType.startsWith("MER_F")) { return generateCentralWavelengthFr(); } else { throw new IllegalArgumentException("'The product has an unsupported product type: " + productType); } } CentralWavelengthProvider(); }
CentralWavelengthProvider { public float[] getCentralWavelength(final String productType) { if (productType.startsWith("MER_RR")) { return centralWavelenthRr; } else if (productType.startsWith("MER_F")) { return generateCentralWavelengthFr(); } else { throw new IllegalArgumentException("'The product has an unsupported product type: " + productType); } } CentralWavelengthProvider(); void readAuxData(File auxDataDir); void readCW(InputStream inputStream); float[] getCentralWavelength(final String productType); }
CentralWavelengthProvider { public float[] getCentralWavelength(final String productType) { if (productType.startsWith("MER_RR")) { return centralWavelenthRr; } else if (productType.startsWith("MER_F")) { return generateCentralWavelengthFr(); } else { throw new IllegalArgumentException("'The product has an unsupported product type: " + productType); } } CentralWavelengthProvider(); void readAuxData(File auxDataDir); void readCW(InputStream inputStream); float[] getCentralWavelength(final String productType);  }