Class Expression.AssertionExpression<E>

java.lang.Object
edu.washington.cs.knowitall.regex.Expression.AssertionExpression<E>
Type Parameters:
E -
All Implemented Interfaces:
com.google.common.base.Predicate<E>, Expression<E>, Predicate<E>
Direct Known Subclasses:
Expression.EndAssertion, Expression.StartAssertion
Enclosing interface:
Expression<E>

public abstract static class Expression.AssertionExpression<E> extends Object implements Expression<E>
A non-consuming expression that matches a token against a property of the text, such as the start or end of a line.
  • Constructor Details

    • AssertionExpression

      public AssertionExpression()
  • Method Details

    • apply

      public boolean apply(E entity)
      Specified by:
      apply in interface com.google.common.base.Predicate<E>
    • apply

      public abstract boolean apply(boolean hasStart, List<E> tokens, int count)
    • 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>