Package classycle.util
Class NotStringPattern
- java.lang.Object
-
- classycle.util.NotStringPattern
-
- All Implemented Interfaces:
StringPattern
public class NotStringPattern extends java.lang.Object implements StringPattern
Logical NOT operation on the result of a wrappedStringPattern
.- Author:
- Franz-Josef Elmer
-
-
Constructor Summary
Constructors Constructor Description NotStringPattern(StringPattern pattern)
Creates an instance based on the specified pattern.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matches(java.lang.String string)
Returns true if the wrappedStringPattern
returns false and vice-versa.java.lang.String
toString()
-
-
-
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 wrappedStringPattern
returns false and vice-versa.- Specified by:
matches
in interfaceStringPattern
- Parameters:
string
- String to be matched. Can be null.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-