@Test( expected = NullPointerException.class ) public void testRemoveElementException() { group.removeElement( null ); }
protected void removeElement( final Element element ) { if ( element == null ) { throw new NullPointerException(); } if ( footer == element ) { this.footer.setParent( null ); this.footer = new GroupFooter(); this.footer.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.footer ); } else if ( header == element ) { this.header.setParent( null ); this.header = new GroupHeader(); this.header.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.header ); } else { super.removeElement( element ); } }
RelationalGroup extends Group { protected void removeElement( final Element element ) { if ( element == null ) { throw new NullPointerException(); } if ( footer == element ) { this.footer.setParent( null ); this.footer = new GroupFooter(); this.footer.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.footer ); } else if ( header == element ) { this.header.setParent( null ); this.header = new GroupHeader(); this.header.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.header ); } else { super.removeElement( element ); } } }
RelationalGroup extends Group { protected void removeElement( final Element element ) { if ( element == null ) { throw new NullPointerException(); } if ( footer == element ) { this.footer.setParent( null ); this.footer = new GroupFooter(); this.footer.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.footer ); } else if ( header == element ) { this.header.setParent( null ); this.header = new GroupHeader(); this.header.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.header ); } else { super.removeElement( element ); } } RelationalGroup(); }
RelationalGroup extends Group { protected void removeElement( final Element element ) { if ( element == null ) { throw new NullPointerException(); } if ( footer == element ) { this.footer.setParent( null ); this.footer = new GroupFooter(); this.footer.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.footer ); } else if ( header == element ) { this.header.setParent( null ); this.header = new GroupHeader(); this.header.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.header ); } else { super.removeElement( element ); } } RelationalGroup(); GroupHeader getHeader(); void setHeader( final GroupHeader header ); GroupFooter getFooter(); void setFooter( final GroupFooter footer ); void setFields( final List<String> c ); void clearFields(); int getElementCount(); void addField( final String name ); List<String> getFields(); void setFieldsArray( final String[] fields ); String[] getFieldsArray(); String toString(); void setBody( final GroupBody body ); boolean equals( final Object obj ); int hashCode(); boolean isGroupChange( final DataRow dataRow ); @Deprecated GroupDataBody findGroupDataBody(); RelationalGroup clone(); RelationalGroup derive( final boolean preserveElementInstanceIds ); Element getElement( final int index ); void setElementAt( final int index, final Element element ); List<SortConstraint> getSortingConstraint(); }
RelationalGroup extends Group { protected void removeElement( final Element element ) { if ( element == null ) { throw new NullPointerException(); } if ( footer == element ) { this.footer.setParent( null ); this.footer = new GroupFooter(); this.footer.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.footer ); } else if ( header == element ) { this.header.setParent( null ); this.header = new GroupHeader(); this.header.setParent( this ); notifyNodeChildRemoved( element ); notifyNodeChildAdded( this.header ); } else { super.removeElement( element ); } } RelationalGroup(); GroupHeader getHeader(); void setHeader( final GroupHeader header ); GroupFooter getFooter(); void setFooter( final GroupFooter footer ); void setFields( final List<String> c ); void clearFields(); int getElementCount(); void addField( final String name ); List<String> getFields(); void setFieldsArray( final String[] fields ); String[] getFieldsArray(); String toString(); void setBody( final GroupBody body ); boolean equals( final Object obj ); int hashCode(); boolean isGroupChange( final DataRow dataRow ); @Deprecated GroupDataBody findGroupDataBody(); RelationalGroup clone(); RelationalGroup derive( final boolean preserveElementInstanceIds ); Element getElement( final int index ); void setElementAt( final int index, final Element element ); List<SortConstraint> getSortingConstraint();  }