classycle.util
Class NotStringPattern

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

public class NotStringPattern
extends java.lang.Object
implements StringPattern

Logical NOT operation on the result of a wrapped StringPattern.

Author:
Franz-Josef Elmer

Constructor Summary
NotStringPattern(StringPattern pattern)
          Creates an instance based on the specified pattern.
 
Method Summary
 boolean matches(java.lang.String string)
          Returns true if the wrapped StringPattern returns false and vice-versa.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

matches

public boolean matches(java.lang.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object