Package classycle.util
Class OrStringPattern
java.lang.Object
classycle.util.StringPatternSequence
classycle.util.OrStringPattern
- All Implemented Interfaces:
StringPattern
Logical OR Operation on a sequence of
StringPatterns
.- Author:
- Franz-Josef Elmer
-
Field Summary
Fields inherited from class classycle.util.StringPatternSequence
_patterns
-
Constructor Summary
ConstructorsConstructorDescriptionOrStringPattern
(StringPattern... pattern) Creates instance with specified patterns. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Returns the operator symbol for pretty printing.boolean
Returntrue
if a pattern in the sequence returnstrue
.Methods inherited from class classycle.util.StringPatternSequence
appendPattern, toString
-
Constructor Details
-
OrStringPattern
Creates instance with specified patterns.
-
-
Method Details
-
matches
Returntrue
if a pattern in the sequence returnstrue
. Otherwisefalse
is returned.- Parameters:
string
- String to be matched. Can be null.
-
getOperatorSymbol
Description copied from class:StringPatternSequence
Returns the operator symbol for pretty printing. Needed bytoString()
.- Specified by:
getOperatorSymbol
in classStringPatternSequence
-