Package org.apache.hadoop.hbase
Class MatcherPredicate<T>
java.lang.Object
org.apache.hadoop.hbase.MatcherPredicate<T>
- Type Parameters:
T
- The type of value to be evaluated viaMatcher
.
- All Implemented Interfaces:
Waiter.ExplainingPredicate<RuntimeException>
,Waiter.Predicate<RuntimeException>
@Private
public class MatcherPredicate<T>
extends Object
implements Waiter.ExplainingPredicate<RuntimeException>
An implementation of
Waiter.ExplainingPredicate
that uses Hamcrest Matcher
for
both predicate evaluation and explanation.-
Field Summary
-
Constructor Summary
ConstructorDescriptionMatcherPredicate
(String reason, Supplier<T> supplier, org.hamcrest.Matcher<? super T> matcher) MatcherPredicate
(Supplier<T> supplier, org.hamcrest.Matcher<? super T> matcher) -
Method Summary
Modifier and TypeMethodDescriptionboolean
evaluate()
Perform a predicate evaluation.Perform a predicate evaluation.
-
Field Details
-
reason
-
supplier
-
matcher
-
currentValue
-
-
Constructor Details
-
MatcherPredicate
-
MatcherPredicate
public MatcherPredicate(String reason, Supplier<T> supplier, org.hamcrest.Matcher<? super T> matcher)
-
-
Method Details
-
evaluate
Description copied from interface:Waiter.Predicate
Perform a predicate evaluation.- Specified by:
evaluate
in interfaceWaiter.Predicate<T>
- Returns:
- the boolean result of the evaluation.
-
explainFailure
Description copied from interface:Waiter.ExplainingPredicate
Perform a predicate evaluation.- Specified by:
explainFailure
in interfaceWaiter.ExplainingPredicate<T>
- Returns:
- explanation of failed state
-