@Test( expected = NullPointerException.class ) public void testRemoveElementException() { body.removeElement( null ); }
protected void removeElement( final Element element ) { if ( element == null ) { throw new NullPointerException(); } if ( element == itemBand ) { this.itemBand.setParent( null ); this.itemBand = new ItemBand(); this.itemBand.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.itemBand ); } else if ( element == noDataBand ) { this.noDataBand.setParent( null ); this.noDataBand = new NoDataBand(); this.noDataBand.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.noDataBand ); } else if ( element == detailsHeader ) { this.detailsHeader.setParent( null ); this.detailsHeader = new DetailsHeader(); this.detailsHeader.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.detailsHeader ); } else if ( element == detailsFooter ) { this.detailsFooter.setParent( null ); this.detailsFooter = new DetailsFooter(); this.detailsFooter.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.detailsFooter ); } }
GroupDataBody extends GroupBody { protected void removeElement( final Element element ) { if ( element == null ) { throw new NullPointerException(); } if ( element == itemBand ) { this.itemBand.setParent( null ); this.itemBand = new ItemBand(); this.itemBand.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.itemBand ); } else if ( element == noDataBand ) { this.noDataBand.setParent( null ); this.noDataBand = new NoDataBand(); this.noDataBand.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.noDataBand ); } else if ( element == detailsHeader ) { this.detailsHeader.setParent( null ); this.detailsHeader = new DetailsHeader(); this.detailsHeader.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.detailsHeader ); } else if ( element == detailsFooter ) { this.detailsFooter.setParent( null ); this.detailsFooter = new DetailsFooter(); this.detailsFooter.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.detailsFooter ); } } }
GroupDataBody extends GroupBody { protected void removeElement( final Element element ) { if ( element == null ) { throw new NullPointerException(); } if ( element == itemBand ) { this.itemBand.setParent( null ); this.itemBand = new ItemBand(); this.itemBand.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.itemBand ); } else if ( element == noDataBand ) { this.noDataBand.setParent( null ); this.noDataBand = new NoDataBand(); this.noDataBand.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.noDataBand ); } else if ( element == detailsHeader ) { this.detailsHeader.setParent( null ); this.detailsHeader = new DetailsHeader(); this.detailsHeader.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.detailsHeader ); } else if ( element == detailsFooter ) { this.detailsFooter.setParent( null ); this.detailsFooter = new DetailsFooter(); this.detailsFooter.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.detailsFooter ); } } GroupDataBody(); }
GroupDataBody extends GroupBody { protected void removeElement( final Element element ) { if ( element == null ) { throw new NullPointerException(); } if ( element == itemBand ) { this.itemBand.setParent( null ); this.itemBand = new ItemBand(); this.itemBand.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.itemBand ); } else if ( element == noDataBand ) { this.noDataBand.setParent( null ); this.noDataBand = new NoDataBand(); this.noDataBand.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.noDataBand ); } else if ( element == detailsHeader ) { this.detailsHeader.setParent( null ); this.detailsHeader = new DetailsHeader(); this.detailsHeader.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.detailsHeader ); } else if ( element == detailsFooter ) { this.detailsFooter.setParent( null ); this.detailsFooter = new DetailsFooter(); this.detailsFooter.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.detailsFooter ); } } GroupDataBody(); Group getGroup(); NoDataBand getNoDataBand(); void setNoDataBand( final NoDataBand noDataBand ); ItemBand getItemBand(); void setItemBand( final ItemBand itemBand ); DetailsHeader getDetailsHeader(); void setDetailsHeader( final DetailsHeader detailsHeader ); DetailsFooter getDetailsFooter(); void setDetailsFooter( final DetailsFooter detailsFooter ); int getElementCount(); Element getElement( final int index ); void setElementAt( final int position, final Element element ); GroupDataBody clone(); GroupDataBody derive( final boolean preserveElementInstanceIds ); }
GroupDataBody extends GroupBody { protected void removeElement( final Element element ) { if ( element == null ) { throw new NullPointerException(); } if ( element == itemBand ) { this.itemBand.setParent( null ); this.itemBand = new ItemBand(); this.itemBand.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.itemBand ); } else if ( element == noDataBand ) { this.noDataBand.setParent( null ); this.noDataBand = new NoDataBand(); this.noDataBand.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.noDataBand ); } else if ( element == detailsHeader ) { this.detailsHeader.setParent( null ); this.detailsHeader = new DetailsHeader(); this.detailsHeader.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.detailsHeader ); } else if ( element == detailsFooter ) { this.detailsFooter.setParent( null ); this.detailsFooter = new DetailsFooter(); this.detailsFooter.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.detailsFooter ); } } GroupDataBody(); Group getGroup(); NoDataBand getNoDataBand(); void setNoDataBand( final NoDataBand noDataBand ); ItemBand getItemBand(); void setItemBand( final ItemBand itemBand ); DetailsHeader getDetailsHeader(); void setDetailsHeader( final DetailsHeader detailsHeader ); DetailsFooter getDetailsFooter(); void setDetailsFooter( final DetailsFooter detailsFooter ); int getElementCount(); Element getElement( final int index ); void setElementAt( final int position, final Element element ); GroupDataBody clone(); GroupDataBody derive( final boolean preserveElementInstanceIds );  }