Package org.hamcrest
Class Condition<T>
java.lang.Object
org.hamcrest.Condition<T>
- Direct Known Subclasses:
Condition.Matched
,Condition.NotMatched
A Condition implements part of a multi-step match. We sometimes need to write matchers
that have a sequence of steps, where each step depends on the result of the previous
step and we can stop processing as soon as a step fails. These classes provide
infrastructure for writing such a sequence.
Based on https://github.com/npryce/maybe-java
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
private static final class
static interface
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract <U> Condition
<U> and
(Condition.Step<? super T, U> mapping) static <T> Condition
<T> matched
(T theValue, Description mismatch) final boolean
abstract boolean
static <T> Condition
<T> final <U> Condition
<U> then
(Condition.Step<? super T, U> mapping)
-
Field Details
-
NOT_MATCHED
-
-
Constructor Details
-
Condition
private Condition()
-
-
Method Details
-
matching
-
and
-
matching
-
then
-
notMatched
-
matched
-