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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMatcherPredicate(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 TypeMethodDescriptionbooleanevaluate()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.PredicatePerform a predicate evaluation.- Specified by:
evaluatein interfaceWaiter.Predicate<T>- Returns:
- the boolean result of the evaluation.
-
explainFailure
Description copied from interface:Waiter.ExplainingPredicatePerform a predicate evaluation.- Specified by:
explainFailurein interfaceWaiter.ExplainingPredicate<T>- Returns:
- explanation of failed state
-