See: Description
Interface | Description |
---|---|
LazyConsumer<T> |
Represents an operation to be lazily performed with the success/failure value of a result.
|
Class | Description |
---|---|
LazyResults |
This class consists exclusively of static methods that return lazy
Result instances. |
Lazy results can be manipulated just like any other result; they will try to defer the invocation of the given supplier as long as possible. The purpose is to encapsulate an expensive operation that may be omitted if there's no actual need to examine the result.
Lazy results can be screened and transformed without actually performing the expensive operation:
On the other hand, the supplier will be invoked if any of these terminal operations is performed on a lazy result:
Finally, conditional actions will be performed immediately unless they are
lazy
too:
Once a lazy result retrieves the supplied result, all future operations will be performed immediately and the returned Result objects should not be lazy.
Result
,
LazyResults