@Test public void testGetRequiredMemory() { Product product = new Product("test", "test_type", 100, 180); long memSize = AttachPixelGeoCodingAction.getRequiredMemory(product); assertEquals(288000L, memSize); product = new Product("test", "test_type", 190, 1200); memSize = AttachPixelGeoCodingAction.getRequiredMemory(product); assertEquals(3648000L, memSize); }
static long getRequiredMemory(Product product) { final int width = product.getSceneRasterWidth(); final int height = product.getSceneRasterHeight(); final int sizeOfDouble = 8; return width * height * 2 * sizeOfDouble; }
AttachPixelGeoCodingAction extends AbstractAction implements ContextAwareAction, LookupListener { static long getRequiredMemory(Product product) { final int width = product.getSceneRasterWidth(); final int height = product.getSceneRasterHeight(); final int sizeOfDouble = 8; return width * height * 2 * sizeOfDouble; } }
AttachPixelGeoCodingAction extends AbstractAction implements ContextAwareAction, LookupListener { static long getRequiredMemory(Product product) { final int width = product.getSceneRasterWidth(); final int height = product.getSceneRasterHeight(); final int sizeOfDouble = 8; return width * height * 2 * sizeOfDouble; } AttachPixelGeoCodingAction(); private  AttachPixelGeoCodingAction(Lookup lkp); }
AttachPixelGeoCodingAction extends AbstractAction implements ContextAwareAction, LookupListener { static long getRequiredMemory(Product product) { final int width = product.getSceneRasterWidth(); final int height = product.getSceneRasterHeight(); final int sizeOfDouble = 8; return width * height * 2 * sizeOfDouble; } 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 long getRequiredMemory(Product product) { final int width = product.getSceneRasterWidth(); final int height = product.getSceneRasterHeight(); final int sizeOfDouble = 8; return width * height * 2 * sizeOfDouble; } AttachPixelGeoCodingAction(); private  AttachPixelGeoCodingAction(Lookup lkp); @Override Action createContextAwareInstance(Lookup actionContext); @Override void resultChanged(LookupEvent ev); @Override void actionPerformed(ActionEvent actionEvent);  }