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