src/main/java/com/github/fge/grappa/misc/RangeMatcherBuilder.java
public Rule times(final int nrCycles)
    {
        Preconditions.checkArgument(nrCycles >= 0,
            "illegal repetition number specified (" + nrCycles
                + "), must be 0 or greater");
        return range(Range.singleton(nrCycles));
    }
public Rule times(final int nrCycles)
    {
        Preconditions.checkArgument(nrCycles >= 0,
            "illegal repetition number specified (" + nrCycles
                + "), must be 0 or greater");
        return range(Range.singleton(nrCycles));
    }
Return a rule with an exact number of cycles to run

@param nrCycles the number of cycles
@return a rule
@throws IllegalArgumentException {@code nrCycles} is less than 0

@see Range#singleton(Comparable)