public Pattern < T , F > times ( int times ) { checkIfNoNotPattern ( ) ; checkIfQuantifierApplied ( ) ; Preconditions . checkArgument ( times > 0 , "You should give a positive number greater than 0." ) ; this . quantifier = Quantifier . times ( quantifier . getConsumingStrategy ( ) ) ; this . times = Times . of ( times ) ; return this ; }
Specifies exact number of times that this pattern should be matched .