@Test public void testGetElement() { assertThat( body.getElement( 0 ), is( instanceOf( DetailsHeader.class ) ) ); assertThat( body.getElement( 1 ), is( instanceOf( ItemBand.class ) ) ); assertThat( body.getElement( 2 ), is( instanceOf( NoDataBand.class ) ) ); assertThat( body.getElement( 3 ), is( instanceOf( DetailsFooter.class ) ) ); }
public Element getElement( final int index ) { switch ( index ) { case 0: return detailsHeader; case 1: return itemBand; case 2: return noDataBand; case 3: return detailsFooter; default: throw new IndexOutOfBoundsException(); } }
GroupDataBody extends GroupBody { public Element getElement( final int index ) { switch ( index ) { case 0: return detailsHeader; case 1: return itemBand; case 2: return noDataBand; case 3: return detailsFooter; default: throw new IndexOutOfBoundsException(); } } }
GroupDataBody extends GroupBody { public Element getElement( final int index ) { switch ( index ) { case 0: return detailsHeader; case 1: return itemBand; case 2: return noDataBand; case 3: return detailsFooter; default: throw new IndexOutOfBoundsException(); } } GroupDataBody(); }
GroupDataBody extends GroupBody { public Element getElement( final int index ) { switch ( index ) { case 0: return detailsHeader; case 1: return itemBand; case 2: return noDataBand; case 3: return detailsFooter; default: throw new IndexOutOfBoundsException(); } } 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 { public Element getElement( final int index ) { switch ( index ) { case 0: return detailsHeader; case 1: return itemBand; case 2: return noDataBand; case 3: return detailsFooter; default: throw new IndexOutOfBoundsException(); } } 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 );  }