public Rule max ( final int nrCycles ) { Preconditions . checkArgument ( nrCycles >= 0 , "illegal repetition number specified (" + nrCycles + "), must be 0 or greater" ) ; return range ( Range . atMost ( nrCycles ) ) ; }
Return a rule with a maximum number of cycles to run