public Rule times ( final int minCycles , final int maxCycles ) { Preconditions . checkArgument ( minCycles >= 0 , "illegal repetition number specified (" + minCycles + "), must be 0 or greater" ) ; Preconditions . checkArgument ( maxCycles >= minCycles , "illegal range specified (" + minCycles + ", " + maxCycles + "): maximum must be greater than minimum" ) ; return range ( Range . closed ( minCycles , maxCycles ) ) ; }
Return a rule with both lower and upper bounds on the number of cycles