/** * Applicable only to {@link Quantifier#looping(ConsumingStrategy)} and * {@link Quantifier#times(ConsumingStrategy)} patterns, this option allows more flexibility to the matching events. * * <p>If {@code allowCombinations()} is not applied for a * pattern {@code A.oneOrMore().followedBy(B)} and a sequence of events * {@code A1 A2 B} appears, this will generate patterns: * {@code A1 B} and {@code A1 A2 B}. If this method is applied, we * will have {@code A1 B}, {@code A2 B} and {@code A1 A2 B}. * * @return The same pattern with the updated quantifier. * * @throws MalformedPatternException if the quantifier is not applicable to this pattern. */ public Pattern<T, F> allowCombinations() { quantifier.combinations(); return this; }
/** * Applicable only to {@link Quantifier#looping(ConsumingStrategy)} and * {@link Quantifier#times(ConsumingStrategy)} patterns, this option allows more flexibility to the matching events. * * <p>If {@code allowCombinations()} is not applied for a * pattern {@code A.oneOrMore().followedBy(B)} and a sequence of events * {@code A1 A2 B} appears, this will generate patterns: * {@code A1 B} and {@code A1 A2 B}. If this method is applied, we * will have {@code A1 B}, {@code A2 B} and {@code A1 A2 B}. * * @return The same pattern with the updated quantifier. * * @throws MalformedPatternException if the quantifier is not applicable to this pattern. */ public Pattern<T, F> allowCombinations() { quantifier.combinations(); return this; }
/** * Applicable only to {@link Quantifier#looping(ConsumingStrategy)} and * {@link Quantifier#times(ConsumingStrategy)} patterns, this option allows more flexibility to the matching events. * * <p>If {@code allowCombinations()} is not applied for a * pattern {@code A.oneOrMore().followedBy(B)} and a sequence of events * {@code A1 A2 B} appears, this will generate patterns: * {@code A1 B} and {@code A1 A2 B}. If this method is applied, we * will have {@code A1 B}, {@code A2 B} and {@code A1 A2 B}. * * @return The same pattern with the updated quantifier. * * @throws MalformedPatternException if the quantifier is not applicable to this pattern. */ public Pattern<T, F> allowCombinations() { quantifier.combinations(); return this; }
/** * Applicable only to {@link Quantifier#ONE_OR_MORE(ConsumingStrategy)} and * {@link Quantifier#TIMES(ConsumingStrategy)} patterns, this option allows more flexibility to the matching events. * * <p>If {@code allowCombinations()} is not applied for a * pattern {@code A.oneOrMore().followedBy(B)} and a sequence of events * {@code A1 A2 B} appears, this will generate patterns: * {@code A1 B} and {@code A1 A2 B}. If this method is applied, we * will have {@code A1 B}, {@code A2 B} and {@code A1 A2 B}. * * @return The same pattern with the updated quantifier. * * @throws MalformedPatternException if the quantifier is not applicable to this pattern. */ public Pattern<T, F> allowCombinations() { quantifier.combinations(); return this; }