| Modifier and Type | Method and Description |
|---|---|
default @Nonnull FailableUnaryFunction<Object,OUTPUT,EXCEPTION> |
asFunction()
Returns this producer as a unary function that ignores its input.
|
default <FINAL_OUTPUT> |
before(@Nonnull FailableUnaryFunction<? super OUTPUT,? extends FINAL_OUTPUT,? extends EXCEPTION> function)
Returns the composition of this producer followed by the given function.
|
static <INTERMEDIATE,OUTPUT,EXCEPTION extends Exception> |
compose(@Nonnull FailableProducer<? extends INTERMEDIATE,? extends EXCEPTION> producer,
@Nonnull FailableUnaryFunction<? super INTERMEDIATE,? extends OUTPUT,? extends EXCEPTION> function)
Returns the composition of the given producer and function with a flexible exception type.
|
default @Nonnull FailableProducer<OUTPUT,EXCEPTION> |
memoize(long duration)
Returns a producer that caches each object produced by this producer for the given duration in milliseconds.
|
OUTPUT |
produce()
Produces a result.
|
default @Nonnull Producer<OUTPUT> |
suppressExceptions()
Returns a producer that suppresses the exceptions of this producer and returns null instead.
|
default @Nonnull Producer<OUTPUT> |
suppressExceptions(@Nonnull Consumer<? super Exception> handler)
Returns a producer that catches the exceptions of this producer, passes them to the given exception handler and returns null instead.
|
default @Nonnull Producer<OUTPUT> |
suppressExceptions(@Nonnull Consumer<? super Exception> handler,
OUTPUT defaultOutput)
Returns a producer that catches the exceptions of this producer, passes them to the given exception handler and returns the given default output instead.
|
default @Nonnull Producer<OUTPUT> |
suppressExceptions(OUTPUT defaultOutput)
Returns a producer that suppresses the exceptions of this producer and returns the given default output instead.
|
default @Nonnull FailableProducer<OUTPUT,EXCEPTION> |
synchronize()
Returns a producer that synchronizes on this producer.
|
@Pure @Nonnull default @Nonnull Producer<OUTPUT> suppressExceptions(@Captured @Nonnull @Nonnull Consumer<? super Exception> handler, @Captured OUTPUT defaultOutput)
@Pure @Nonnull default @Nonnull Producer<OUTPUT> suppressExceptions(@Captured @Nonnull @Nonnull Consumer<? super Exception> handler)
@Pure @Nonnull default @Nonnull Producer<OUTPUT> suppressExceptions(@Captured OUTPUT defaultOutput)
@Pure @Nonnull default @Nonnull Producer<OUTPUT> suppressExceptions()
@Pure @Capturable @Nonnull static <INTERMEDIATE,OUTPUT,EXCEPTION extends Exception> @Nonnull FailableProducer<OUTPUT,EXCEPTION> compose(@Captured @Nonnull @Nonnull FailableProducer<? extends INTERMEDIATE,? extends EXCEPTION> producer, @Nonnull @Nonnull FailableUnaryFunction<? super INTERMEDIATE,? extends OUTPUT,? extends EXCEPTION> function)
@Pure @Nonnull default <FINAL_OUTPUT> @Nonnull FailableProducer<FINAL_OUTPUT,EXCEPTION> before(@Nonnull @Nonnull FailableUnaryFunction<? super OUTPUT,? extends FINAL_OUTPUT,? extends EXCEPTION> function)
@Pure @Nonnull default @Nonnull FailableUnaryFunction<Object,OUTPUT,EXCEPTION> asFunction()
@Pure @Nonnull default @Nonnull FailableProducer<OUTPUT,EXCEPTION> synchronize()
@Pure @Nonnull default @Nonnull FailableProducer<OUTPUT,EXCEPTION> memoize(long duration)
Copyright © 2017. All rights reserved.