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>, Predicate<E>
Enclosing interface:
Expression<E>

public abstract static class Expression.BaseExpression<E> extends Object implements Expression<E>
An expression with no subexpression that is evaluated against a token using the supplied delegate.
  • Field Details

    • source

      public final String source
  • Constructor Details

    • BaseExpression

      public BaseExpression(String source)
  • Method Details

    • apply

      public abstract boolean apply(E entity)
      The delegate to evaluate the expression against a token.
      Specified by:
      apply in interface com.google.common.base.Predicate<E>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • build

      public FiniteAutomaton.Automaton<E> build()
      Convert the expression into a NFA.
      Specified by:
      build in interface Expression<E>
    • minMatchingLength

      public int minMatchingLength()
      Specified by:
      minMatchingLength in interface Expression<E>