E - public static class Expression.MinMax<E> extends java.lang.Object implements Expression<E>
<foo>{1,3}Expression.AssertionExpression<E>, Expression.BaseExpression<E>, Expression.EndAssertion<E>, Expression.MatchingGroup<E>, Expression.MinMax<E>, Expression.NamedGroup<E>, Expression.NonMatchingGroup<E>, Expression.Option<E>, Expression.Or<E>, Expression.Plus<E>, Expression.Star<E>, Expression.StartAssertion<E>| Constructor and Description |
|---|
Expression.MinMax(Expression<E> expr,
int minOccurrences,
int maxOccurrences) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply(E entity) |
FiniteAutomaton.Automaton<E> |
build()
Convert the expression into a NFA.
|
int |
minMatchingLength() |
java.lang.String |
toString() |
public Expression.MinMax(Expression<E> expr, int minOccurrences, int maxOccurrences)
minOccurrences - minimum occurrences, must be >= 0maxOccurrences - maximum occurrences, must be >= 1 - you should prefer small values,
as the use of large values will create a large automaton that takes a lot of memorypublic boolean apply(E entity)
apply in interface com.google.common.base.Predicate<E>public java.lang.String toString()
toString in class java.lang.Objectpublic FiniteAutomaton.Automaton<E> build()
build in interface Expression<E>public int minMatchingLength()
minMatchingLength in interface Expression<E>