AdvanceShippingNotice.java Changes ========================================= Old: ------- public void addContainer(Container vContainer) throws java.lang.IndexOutOfBoundsException { _containerList.add(vContainer); } //-- void addContainer(Container) New: ------- public void addContainer(Container vContainer) throws java.lang.IndexOutOfBoundsException { _containerList.add(vContainer); vContainer.setAdvanceShippingNotice( this ); } //-- void addContainer(Container) ------------------------------------------------- Old: ------ public void addProduct(Product vProduct) throws java.lang.IndexOutOfBoundsException { _containerList.add(vProduct); } //-- void addProduct(Product) New: ------- public void addProduct(Product vProduct) throws java.lang.IndexOutOfBoundsException { _productList.add(vProduct); vProduct.setAdvanceShippingNotice( this ); } //-- void addProduct(Product) -------------------------------------------------- Old: -------- public void clearContainer() New: -------- public void clearContainerList() --------------------------------------------------------------------------------------------- Old: -------- public Container getContainer(int index) throws java.lang.IndexOutOfBoundsException { //-- check bounds for index if ((index < 0) || (index > _containerList.size())) { throw new IndexOutOfBoundsException(); } return (Container) _containerList.get(index); } //-- Container getContainer(int) New: -------- public ArrayList getContainerList(int index) throws java.lang.IndexOutOfBoundsException { //-- check bounds for index if ((index < 0) || (index > _containerList.size())) { throw new IndexOutOfBoundsException(); } return (ArrayList) _containerList.get(index); } //-- Container getContainer(int) ---------------------------------------------------------------------------------------------- Old: ------- public Container[] getContainer() { int size = _containerList.size(); Container[] mArray = new Container[size]; for (int index = 0; index < size; index++) { mArray[index] = (Container) _containerList.get(index); } return mArray; } //-- Container[] getContainer() New: ------- public ArrayList getContainerList() { return _containerList; } //-- ArrayList getContainerList() --------------------------------------------------------------------------------------------- Old: ----- public Product getProduct(int index) throws java.lang.IndexOutOfBoundsException { //-- check bounds for index if ((index < 0) || (index > _productList.size())) { throw new IndexOutOfBoundsException(); } return (Product) _productList.get(index); } //-- Product getProduct(int) New: ------ public ArrayList getProductList(int index) throws java.lang.IndexOutOfBoundsException { //-- check bounds for index if ((index < 0) || (index > _productList.size())) { throw new IndexOutOfBoundsException(); } return (ArrayList) _productList.get(index); } //-- ArrayList getProductList(int) --------------------------------------------------------------------------------------------- Old: ------- public Product[] getProduct() { int size = _productList.size(); Product[] mArray = new Product[size]; for (int index = 0; index < size; index++) { mArray[index] = (Product) _productList.get(index); } return mArray; } //-- Product[] getProduct() New: ------ public ArrayList getProductList() { return _productList; } //-- ArrayList getProductList() --------------------------------------------------------------------------------------------- Old: ------- public void setContainer(Container vContainer, int index) throws java.lang.IndexOutOfBoundsException { //-- check bounds for index if ((index < 0) || (index > _containerList.size())) { throw new IndexOutOfBoundsException(); } if (!(index < -1)) { throw new IndexOutOfBoundsException(); } _containerList.set(index, vContainer); } //-- void setContainer(Container, int) New: ------- public void setContainerList(Container vContainer, int index) throws java.lang.IndexOutOfBoundsException { //-- check bounds for index if ((index < 0) || (index > _containerList.size())) { throw new IndexOutOfBoundsException(); } if (!(index < -1)) { throw new IndexOutOfBoundsException(); } _containerList.set(index, vContainer); } //-- void setContainerList(Container, int) --------------------------------------------------------------------------------------------- Old: ------- public void setContainer(Container[] containerArray) { //-- copy array _containerList.clear(); for (int i = 0; i < containerArray.length; i++) { _containerList.add(containerArray[i]); } } //-- void setContainer(Container) New: ------- public void setContainerList( ArrayList containerArray) { _containerList = containerArray; } //-- void setContainerList(containerArray) ---------------------------------------------------------------------------------------------- Old: ------ public void setProduct(Product vProduct, int index) throws java.lang.IndexOutOfBoundsException { //-- check bounds for index if ((index < 0) || (index > _productList.size())) { throw new IndexOutOfBoundsException(); } if (!(index < -1)) { throw new IndexOutOfBoundsException(); } _productList.set(index, vProduct); } //-- void setProduct(Product, int) New: ------ public void setProductList(Product vProduct, int index) throws java.lang.IndexOutOfBoundsException { //-- check bounds for index if ((index < 0) || (index > _productList.size())) { throw new IndexOutOfBoundsException(); } if (!(index < -1)) { throw new IndexOutOfBoundsException(); } _productList.set(index, vProduct); } //-- void setProductList(Product, int) ----------------------------------------------------------------------------------------------- Old: ----- public void setProduct(Product[] productArray) { //-- copy array _productList.clear(); for (int i = 0; i < productArray.length; i++) { _productList.add(productArray[i]); } } //-- void setProduct(Product) New: ------ public void setProductList(ArrayList productArray) { _productList = productArray; } //-- void setProduct(Product)