- Type Parameters:
D - Type of the value to capture.
public class Value<D>
extends Object
Special type of Check, which implements extraction of a value out of the tested data for later use.
It's not only extracting a value. It also enforcing a check on that value.
The motivation fo this approach is:
Often the subject of the validation is a stream of events, or it needs to be retried due to asynchronous nature
of the tested system.
Simply calling some API, and immediate getting of the value could lead to get unexpected result, because the
system didn't get to the desired state yet.
Or in case of stream of events, we may look for a state which meets some complex checks. Once that one is identified,
we'd need to find out the index etc.
With te Value, we simply plug the value extraction (a.k.a. capturing) into such complex check, and we can access the
value later.