Class Expression.BaseExpression<E>
- java.lang.Object
-
- edu.washington.cs.knowitall.regex.Expression.BaseExpression<E>
-
- Type Parameters:
E-
- All Implemented Interfaces:
com.google.common.base.Predicate<E>,Expression<E>,java.util.function.Predicate<E>
- Enclosing interface:
- Expression<E>
public abstract static class Expression.BaseExpression<E> extends java.lang.Object implements Expression<E>
An expression with no subexpression that is evaluated against a token using the supplied delegate.
-
-
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.lang.Stringsource
-
Constructor Summary
Constructors Constructor Description BaseExpression(java.lang.String source)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanapply(E entity)The delegate to evaluate the expression against a token.FiniteAutomaton.Automaton<E>build()Convert the expression into a NFA.intminMatchingLength()java.lang.StringtoString()
-
-
-
Method Detail
-
apply
public abstract boolean apply(E entity)
The delegate to evaluate the expression against a token.- Specified by:
applyin interfacecom.google.common.base.Predicate<E>
-
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>
-
-