@SuppressWarnings("ResultOfMethodCallIgnored") @Test public void testGetResolutionInKm_invalidNameEnding() { try { SlstrLevel1ProductFactory.getResolutionInKm("heffalump"); fail("IllegalArgumentException expected"); } catch (IllegalArgumentException expected) { } }
static double getResolutionInKm(String nameEnd) { switch (nameEnd) { case "an": case "ao": case "bn": case "bo": case "cn": case "co": return 0.5; case "fn": case "fo": case "in": case "io": return 1.0; default: throw new IllegalArgumentException("Unsupported resolution on bands ending with: " + nameEnd); } }
SlstrLevel1ProductFactory extends SlstrProductFactory { static double getResolutionInKm(String nameEnd) { switch (nameEnd) { case "an": case "ao": case "bn": case "bo": case "cn": case "co": return 0.5; case "fn": case "fo": case "in": case "io": return 1.0; default: throw new IllegalArgumentException("Unsupported resolution on bands ending with: " + nameEnd); } } }
SlstrLevel1ProductFactory extends SlstrProductFactory { static double getResolutionInKm(String nameEnd) { switch (nameEnd) { case "an": case "ao": case "bn": case "bo": case "cn": case "co": return 0.5; case "fn": case "fo": case "in": case "io": return 1.0; default: throw new IllegalArgumentException("Unsupported resolution on bands ending with: " + nameEnd); } } SlstrLevel1ProductFactory(Sentinel3ProductReader productReader); }
SlstrLevel1ProductFactory extends SlstrProductFactory { static double getResolutionInKm(String nameEnd) { switch (nameEnd) { case "an": case "ao": case "bn": case "bo": case "cn": case "co": return 0.5; case "fn": case "fo": case "in": case "io": return 1.0; default: throw new IllegalArgumentException("Unsupported resolution on bands ending with: " + nameEnd); } } SlstrLevel1ProductFactory(Sentinel3ProductReader productReader); @Override void dispose(); }
SlstrLevel1ProductFactory extends SlstrProductFactory { static double getResolutionInKm(String nameEnd) { switch (nameEnd) { case "an": case "ao": case "bn": case "bo": case "cn": case "co": return 0.5; case "fn": case "fo": case "in": case "io": return 1.0; default: throw new IllegalArgumentException("Unsupported resolution on bands ending with: " + nameEnd); } } SlstrLevel1ProductFactory(Sentinel3ProductReader productReader); @Override void dispose(); final static String SLSTR_L1B_USE_PIXELGEOCODINGS; final static String SLSTR_L1B_LOAD_ORPHAN_PIXELS; final static String SLSTR_L1B_CUSTOM_CALIBRATION; final static String SLSTR_L1B_S3MPC_CALIBRATION; }