Class NotMatcher

All Implemented Interfaces:
IHeaderMatcher

public class NotMatcher extends AbstractHeaderMatcher
An IHeaderMatcher that reverses the result of an enclosed matcher.
  • Constructor Details

    • NotMatcher

      public NotMatcher(String id, IHeaderMatcher enclosed)
      Create the matcher with the enclosed matcher and id.
      Parameters:
      id - the id for this matcher. May be null
      enclosed - the enclosed matcher
  • Method Details

    • getEnclosed

      public IHeaderMatcher getEnclosed()
    • matches

      public boolean matches(IHeaders headers)
      Description copied from interface: IHeaderMatcher
      Attempts to match text in the IHeaders instance.
      Parameters:
      headers - the representations of the headers to check
      Returns:
      true if the matcher matches the text, false otherwise.
    • reset

      public void reset()
      Description copied from interface: IHeaderMatcher
      Resets this state of this matcher to its initial state in preparation for use with another document scan. In most cases this method does not need to do anything.