Class NotStringPattern

java.lang.Object
classycle.util.NotStringPattern
All Implemented Interfaces:
StringPattern

public class NotStringPattern extends Object implements StringPattern
Logical NOT operation on the result of a wrapped StringPattern.
Author:
Franz-Josef Elmer
  • Constructor Details

    • NotStringPattern

      public NotStringPattern(StringPattern pattern)
      Creates an instance based on the specified pattern.
      Parameters:
      pattern - Pattern who's matching result will be negate. Must be not null.
  • Method Details

    • matches

      public boolean matches(String string)
      Returns true if the wrapped StringPattern returns false and vice-versa.
      Specified by:
      matches in interface StringPattern
      Parameters:
      string - String to be matched. Can be null.
    • toString

      public String toString()
      Overrides:
      toString in class Object