T - Type of the data to be tested using this check.public interface Check<T>
| Modifier and Type | Method and Description |
|---|---|
default <U extends T> |
and(Check<? super U> operand)
Compose this check with another one using logical AND operator.
|
static <T> Result |
evaluate(T data,
Check<? super T> check) |
Result |
evaluate(T data,
ResultFactory factory)
Abstract method to delegate implementation of specific check logic to subclasses.
|
default <U extends T> |
or(Check<? super U> operand)
Compose this check with another one using logical OR operator.
|
static <T> boolean |
that(T data,
Check<? super T> check)
Assert the data using provided check.
|
static <T> boolean |
that(T data,
Check<? super T> check,
ResultVisitor visitor) |
@End(message="Check is not used. Pass it either to Assert.that(), Check.that() or Check.evaluate().") Result evaluate(T data, ResultFactory factory)
data - Tested data.factory - Result factory responsible for creating result tree from current node.default <U extends T> Check<U> and(Check<? super U> operand)
U - Type of the data tested by other check. It may cause up-cast.operand - Another check.default <U extends T> Check<U> or(Check<? super U> operand)
U - Type of the data tested by other check. It may cause up-cast.operand - Another check.@End(message="Check is not used. Pass it either to Assert.that(), Check.that() or Check.evaluate().")
static <T> boolean that(T data,
Check<? super T> check)
T - Type of the tested data.data - Tested data.check - Check to be applied.static <T> boolean that(T data,
Check<? super T> check,
ResultVisitor visitor)
Copyright © 2021. All rights reserved.