Class Expression.MatchingGroup<E>
- java.lang.Object
-
- edu.washington.cs.knowitall.regex.Expression.MatchingGroup<E>
-
- Type Parameters:
E-
- All Implemented Interfaces:
com.google.common.base.Predicate<E>,Expression<E>,java.util.function.Predicate<E>
- Direct Known Subclasses:
Expression.NamedGroup,Expression.NonMatchingGroup
- Enclosing interface:
- Expression<E>
public static class Expression.MatchingGroup<E> extends java.lang.Object implements Expression<E>
Represents a matching group that is referred to by order number.(<foo> <bar>+)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface edu.washington.cs.knowitall.regex.Expression
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>
-
-
Field Summary
Fields Modifier and Type Field Description java.util.List<Expression<E>>expressions
-
Constructor Summary
Constructors Constructor Description MatchingGroup(java.util.List<Expression<E>> expressions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapply(E entity)FiniteAutomaton.Automaton<E>build()Convert the expression into a NFA.intminMatchingLength()java.lang.StringsubexpString()java.lang.StringtoString()
-
-
-
Field Detail
-
expressions
public final java.util.List<Expression<E>> expressions
-
-
Constructor Detail
-
MatchingGroup
public MatchingGroup(java.util.List<Expression<E>> expressions)
-
-
Method Detail
-
apply
public boolean apply(E entity)
- Specified by:
applyin interfacecom.google.common.base.Predicate<E>
-
subexpString
public java.lang.String subexpString()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
build
public FiniteAutomaton.Automaton<E> build()
Convert the expression into a NFA.- Specified by:
buildin interfaceExpression<E>
-
minMatchingLength
public int minMatchingLength()
- Specified by:
minMatchingLengthin interfaceExpression<E>
-
-