public void setRecurrence ( int minimumRecurrence , int maximumRecurrence ) { if ( minimumRecurrence > maximumRecurrence ) { throw new IllegalArgumentException ( "minimumRecurrence > maximumRecurrence" ) ; } else if ( minimumRecurrence < 1 ) { throw new IllegalArgumentException ( "minimumRecurrence < 1 not supported" ) ; } else if ( query == null ) { throw new IllegalArgumentException ( "no clause" ) ; } this . minimumRecurrence = minimumRecurrence ; this . maximumRecurrence = maximumRecurrence ; // set minimum/maximum Integer minimum = null ; Integer maximum = null ; if ( query . getMinimumWidth ( ) != null ) { minimum = minimumRecurrence * query . getMinimumWidth ( ) ; } if ( query . getMaximumWidth ( ) != null ) { maximum = maximumRecurrence * query . getMaximumWidth ( ) ; if ( ignoreQuery != null && maximumIgnoreLength != null ) { if ( ignoreQuery . getMaximumWidth ( ) != null ) { maximum += ( maximumRecurrence - 1 ) * maximumIgnoreLength * ignoreQuery . getMaximumWidth ( ) ; } else { maximum = null ; } } } setWidth ( minimum , maximum ) ; }
Sets the recurrence .