Interface Matcher<T>
- Type Parameters:
T- the type of object to match
public interface Matcher<T>
A matcher is a function mapping objects to positive/negative matches.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Matcher<T>always()Returns an always positive-matching matcher.match(ST object) Returns a match for the given object.static <T> Matcher<T>never()Returns an always negative-matching matcher.default Objectobject()static <T> Matcher<T>static <T> Matcher<T>
-
Method Details
-
always
Returns an always positive-matching matcher.
- Type Parameters:
T- the type of object to match- Returns:
- the matcher
-
never
Returns an always negative-matching matcher.
- Type Parameters:
T- the type of object to match- Returns:
- the matcher
-
of
-
of
-
match
Returns a match for the given object.
- Type Parameters:
ST- the type of the object to match- Parameters:
object- the object- Returns:
- the match
-
object
-
and
-