Interface Match<T>
- Type Parameters:
T- the type of the matched object
- All Superinterfaces:
Comparable<Match<T>>
A match represents a match of an object matcher.
-
Method Summary
Modifier and TypeMethodDescriptiondefault intstatic <T> Match<T>match(T object, boolean positive) Returns a simple match with the given object and binary state.booleanmatched()Returns if this match is a positive match.default booleannegative()Returns if this match is a negative match.static <T> Match<T>negative(T object) Returns a negative match with the given object.object()Returns the matched object.static <T> Match<T>positive(T object) Returns a positive match with the given object.
-
Method Details
-
match
Returns a simple match with the given object and binary state.
- Type Parameters:
T- the type of the object- Parameters:
object- the objectpositive- if the match is positive- Returns:
- the match
-
negative
Returns a negative match with the given object.
- Type Parameters:
T- the type of the object- Parameters:
object- the object- Returns:
- the match
-
positive
Returns a positive match with the given object.
- Type Parameters:
T- the type of the object- Parameters:
object- the object- Returns:
- the match
-
compareTo
- Specified by:
compareToin interfaceComparable<T>
-
matched
boolean matched()Returns if this match is a positive match.
- Returns:
- if this match is a positive match
-
negative
default boolean negative()Returns if this match is a negative match.
- Returns:
- if this match is a negative match
-
object
T object()Returns the matched object.
- Returns:
- the matched object
-