@Test( expected = IndexOutOfBoundsException.class ) public void testSetElementAtException() { body.setElementAt( 4, mock( Element.class ) ); }
public void setElementAt( final int position, final Element element ) { switch ( position ) { case 0: setDetailsHeader( (DetailsHeader) element ); break; case 1: setItemBand( (ItemBand) element ); break; case 2: setNoDataBand( (NoDataBand) element ); break; case 3: setDetailsFooter( (DetailsFooter) element ); break; default: throw new IndexOutOfBoundsException(); } }
GroupDataBody extends GroupBody { public void setElementAt( final int position, final Element element ) { switch ( position ) { case 0: setDetailsHeader( (DetailsHeader) element ); break; case 1: setItemBand( (ItemBand) element ); break; case 2: setNoDataBand( (NoDataBand) element ); break; case 3: setDetailsFooter( (DetailsFooter) element ); break; default: throw new IndexOutOfBoundsException(); } } }
GroupDataBody extends GroupBody { public void setElementAt( final int position, final Element element ) { switch ( position ) { case 0: setDetailsHeader( (DetailsHeader) element ); break; case 1: setItemBand( (ItemBand) element ); break; case 2: setNoDataBand( (NoDataBand) element ); break; case 3: setDetailsFooter( (DetailsFooter) element ); break; default: throw new IndexOutOfBoundsException(); } } GroupDataBody(); }
GroupDataBody extends GroupBody { public void setElementAt( final int position, final Element element ) { switch ( position ) { case 0: setDetailsHeader( (DetailsHeader) element ); break; case 1: setItemBand( (ItemBand) element ); break; case 2: setNoDataBand( (NoDataBand) element ); break; case 3: setDetailsFooter( (DetailsFooter) element ); break; 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 void setElementAt( final int position, final Element element ) { switch ( position ) { case 0: setDetailsHeader( (DetailsHeader) element ); break; case 1: setItemBand( (ItemBand) element ); break; case 2: setNoDataBand( (NoDataBand) element ); break; case 3: setDetailsFooter( (DetailsFooter) element ); break; 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 );  }