@Test public void testGetValidBandCount_none() { final Product product = new Product("test", "test_type", 10, 15); final int validCount = AttachPixelGeoCodingAction.getValidBandCount(product); assertEquals(0, validCount); }
static int getValidBandCount(Product product) { final Band[] bands = product.getBands(); int validBandsCount = 0; for (Band band : bands) { if (band.getRasterSize().equals(product.getSceneRasterSize())) { validBandsCount++; if (validBandsCount == 2) { break; } } } return validBandsCount; }
AttachPixelGeoCodingAction extends AbstractAction implements ContextAwareAction, LookupListener { static int getValidBandCount(Product product) { final Band[] bands = product.getBands(); int validBandsCount = 0; for (Band band : bands) { if (band.getRasterSize().equals(product.getSceneRasterSize())) { validBandsCount++; if (validBandsCount == 2) { break; } } } return validBandsCount; } }
AttachPixelGeoCodingAction extends AbstractAction implements ContextAwareAction, LookupListener { static int getValidBandCount(Product product) { final Band[] bands = product.getBands(); int validBandsCount = 0; for (Band band : bands) { if (band.getRasterSize().equals(product.getSceneRasterSize())) { validBandsCount++; if (validBandsCount == 2) { break; } } } return validBandsCount; } AttachPixelGeoCodingAction(); private  AttachPixelGeoCodingAction(Lookup lkp); }
AttachPixelGeoCodingAction extends AbstractAction implements ContextAwareAction, LookupListener { static int getValidBandCount(Product product) { final Band[] bands = product.getBands(); int validBandsCount = 0; for (Band band : bands) { if (band.getRasterSize().equals(product.getSceneRasterSize())) { validBandsCount++; if (validBandsCount == 2) { break; } } } return validBandsCount; } AttachPixelGeoCodingAction(); private  AttachPixelGeoCodingAction(Lookup lkp); @Override Action createContextAwareInstance(Lookup actionContext); @Override void resultChanged(LookupEvent ev); @Override void actionPerformed(ActionEvent actionEvent); }
AttachPixelGeoCodingAction extends AbstractAction implements ContextAwareAction, LookupListener { static int getValidBandCount(Product product) { final Band[] bands = product.getBands(); int validBandsCount = 0; for (Band band : bands) { if (band.getRasterSize().equals(product.getSceneRasterSize())) { validBandsCount++; if (validBandsCount == 2) { break; } } } return validBandsCount; } AttachPixelGeoCodingAction(); private  AttachPixelGeoCodingAction(Lookup lkp); @Override Action createContextAwareInstance(Lookup actionContext); @Override void resultChanged(LookupEvent ev); @Override void actionPerformed(ActionEvent actionEvent);  }