@Test public void testSetElementAt() { GroupHeader header = mock( GroupHeader.class ); SubGroupBody body = mock( SubGroupBody.class ); GroupFooter footer = mock( GroupFooter.class ); group.setElementAt( 0, header ); group.setElementAt( 1, body ); group.setElementAt( 2, footer ); assertThat( group.getHeader(), is( equalTo( header ) ) ); assertThat( (SubGroupBody) group.getBody(), is( equalTo( body ) ) ); assertThat( group.getFooter(), is( equalTo( footer ) ) ); }
public void setElementAt( final int index, final Element element ) { switch ( index ) { case 0: setHeader( (GroupHeader) element ); break; case 1: setBody( (GroupBody) element ); break; case 2: setFooter( (GroupFooter) element ); break; default: throw new IndexOutOfBoundsException(); } }
RelationalGroup extends Group { public void setElementAt( final int index, final Element element ) { switch ( index ) { case 0: setHeader( (GroupHeader) element ); break; case 1: setBody( (GroupBody) element ); break; case 2: setFooter( (GroupFooter) element ); break; default: throw new IndexOutOfBoundsException(); } } }
RelationalGroup extends Group { public void setElementAt( final int index, final Element element ) { switch ( index ) { case 0: setHeader( (GroupHeader) element ); break; case 1: setBody( (GroupBody) element ); break; case 2: setFooter( (GroupFooter) element ); break; default: throw new IndexOutOfBoundsException(); } } RelationalGroup(); }
RelationalGroup extends Group { public void setElementAt( final int index, final Element element ) { switch ( index ) { case 0: setHeader( (GroupHeader) element ); break; case 1: setBody( (GroupBody) element ); break; case 2: setFooter( (GroupFooter) element ); break; default: throw new IndexOutOfBoundsException(); } } 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 { public void setElementAt( final int index, final Element element ) { switch ( index ) { case 0: setHeader( (GroupHeader) element ); break; case 1: setBody( (GroupBody) element ); break; case 2: setFooter( (GroupFooter) element ); break; default: throw new IndexOutOfBoundsException(); } } 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();  }