package it.geosolutions.imageio.plugins.jhdf; public abstract class HDFProducts { private HDFProduct[] productList; private int nProducts; public HDFProducts(final int nProducts){ productList=new HDFProduct[nProducts]; this.nProducts=nProducts; } public void setHDFProduct(final int productIndex, HDFProduct product){ if(productIndex>nProducts) throw new ArrayIndexOutOfBoundsException("Specified product index is out of range"); else productList[productIndex]=product; } public HDFProduct getHDFProduct(final int productIndex){ if(productIndex>nProducts) throw new ArrayIndexOutOfBoundsException("Specified product index is out of range"); else return productList[productIndex]; } public HDFProduct getHDFProduct(final String productName){ final int prodNum = nProducts; for (int i=0;i