T
- The type of value to be evaluated via Matcher
.@InterfaceAudience.Private public class MatcherPredicate<T> extends Object implements Waiter.ExplainingPredicate<RuntimeException>
Waiter.ExplainingPredicate
that uses Hamcrest Matcher
for
both predicate evaluation and explanation.Modifier and Type | Field and Description |
---|---|
private T |
currentValue |
private org.hamcrest.Matcher<? super T> |
matcher |
private String |
reason |
private Supplier<T> |
supplier |
Constructor and Description |
---|
MatcherPredicate(String reason,
Supplier<T> supplier,
org.hamcrest.Matcher<? super T> matcher) |
MatcherPredicate(Supplier<T> supplier,
org.hamcrest.Matcher<? super T> matcher) |
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate()
Perform a predicate evaluation.
|
String |
explainFailure()
Perform a predicate evaluation.
|
private T currentValue
public MatcherPredicate(Supplier<T> supplier, org.hamcrest.Matcher<? super T> matcher)
public MatcherPredicate(String reason, Supplier<T> supplier, org.hamcrest.Matcher<? super T> matcher)
public boolean evaluate()
Waiter.Predicate
evaluate
in interface Waiter.Predicate<RuntimeException>
public String explainFailure()
Waiter.ExplainingPredicate
explainFailure
in interface Waiter.ExplainingPredicate<RuntimeException>
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.