public final class SetOfProducedProducer<T> extends AbstractProducer<Set<Produced<T>>>
Producer implementation used to implement Set bindings. This producer returns a
future Set<Produced<T>> whose elements are populated by subsequent calls to the delegate
Producer.get() methods.| Modifier and Type | Class and Description |
|---|---|
static class |
SetOfProducedProducer.Builder<T>
A builder to accumulate
Producer<T> and Producer<Collection<T>> instances. |
monitor| Modifier and Type | Method and Description |
|---|---|
static <T> SetOfProducedProducer.Builder<T> |
builder(int individualProducerSize,
int collectionProducerSize)
Constructs a new
SetOfProducedProducer.Builder for a SetProducer with individualProducerSize
individual Producer<T> and collectionProducerSize Producer<Collection<T>> instances. |
com.google.common.util.concurrent.ListenableFuture<Set<Produced<T>>> |
compute()
|
static <T> Producer<Set<T>> |
empty() |
getpublic static <T> SetOfProducedProducer.Builder<T> builder(int individualProducerSize, int collectionProducerSize)
SetOfProducedProducer.Builder for a SetProducer with individualProducerSize
individual Producer<T> and collectionProducerSize Producer<Collection<T>> instances.public com.google.common.util.concurrent.ListenableFuture<Set<Produced<T>>> compute()
Set of Produced values whose iteration order is that of the
elements given by each of the producers, which are invoked in the order given at creation.
If any of the delegate collections, or any elements therein, are null, then that
corresponding Produced element will fail with a NullPointerException.
Canceling this future will attempt to cancel all of the component futures; but if any of the
delegate futures fail or are canceled, this future succeeds, with the appropriate failed
Produced.
compute in class AbstractProducer<Set<Produced<T>>>NullPointerException - if any of the delegate producers return nullCopyright © 2016 Google, Inc.. All rights reserved.