Class FutureConjunction

  • All Implemented Interfaces:
    com.google.common.util.concurrent.ListenableFuture<Boolean>, Future<Boolean>

    public final class FutureConjunction
    extends Object
    implements com.google.common.util.concurrent.ListenableFuture<Boolean>

    This class implements a Future<Boolean> that is conjunction of zero or more other Future<Boolean>s, i.e. it evaluates to true if, and only if, all its operands evaluate to true. To use this class, simply create an instance of it and add operands to it using the addOperand(ListenableFuture) method.

    TODO: consider rewriting usage of FutureConjunction to use CompletableFuture instead.
    Author:
    Simon Thoresen Hult