Package io.higson.runtime.matcher
Class ContainsAnyMatcher
java.lang.Object
io.higson.runtime.matcher.AbstractMatcher
io.higson.runtime.matcher.AbstractSetMatcher
io.higson.runtime.matcher.ContainsAnyMatcher
- All Implemented Interfaces:
Matcher
- Direct Known Subclasses:
ContainsNoneMatcher
Matcher treats [value] and [pattern] as sets. Checks if [value] contains all elements in [pattern].
Formally:- p - set represented by [pattern] - pattern in the matrix cell
- v - set represented by [value] - input value for level (given by levelCreator)
&- conjunction of the group- {0} - empty set
Matcher returns the value of the logical sentence:
p & v != {0} - Author:
- przemek hertel
-
Field Summary
Fields inherited from class io.higson.runtime.matcher.AbstractSetMatcher
DEFAULT_SEPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends ValueHolder>
booleanChecks if the set represented by [value] contains at least 1 element from the set represented by [pattern].Methods inherited from class io.higson.runtime.matcher.AbstractSetMatcher
matches
-
Constructor Details
-
ContainsAnyMatcher
public ContainsAnyMatcher(char separator)
-
-
Method Details
-
doMatches
Checks if the set represented by [value] contains at least 1 element from the set represented by [pattern]. The [value] argument must be a file serialized to a string using the separator used by matcher.- Specified by:
doMatchesin classAbstractSetMatcher- Parameters:
value- serialized form of the setpattern- serialized form of the set in the cell - matching patterntype- cell type (level type)
-