T - See ConsumerWhichThrowsEX - See ConsumerWhichThrowspublic class ProxyConsumerWhichThrows<T,EX extends java.lang.Throwable> extends java.lang.Object implements ConsumerWhichThrows<T,EX>
| Constructor and Description |
|---|
ProxyConsumerWhichThrows(ConsumerWhichThrows<? super T,? extends EX> delegate) |
ProxyConsumerWhichThrows(ConsumerWhichThrows<? super T,? extends java.lang.RuntimeException> delegate,
int unused) |
| Modifier and Type | Method and Description |
|---|---|
void |
consume(T subject)
Consumes one
subject of type T. |
void |
setDelegate(ConsumerWhichThrows<? super T,? extends EX> delegate)
Changes the delegate that was previously set through
ProxyConsumerWhichThrows(ConsumerWhichThrows) or
setDelegate(ConsumerWhichThrows). |
public ProxyConsumerWhichThrows(ConsumerWhichThrows<? super T,? extends EX> delegate)
public ProxyConsumerWhichThrows(ConsumerWhichThrows<? super T,? extends java.lang.RuntimeException> delegate, int unused)
public void consume(@NotNull T subject) throws EX extends java.lang.Throwable
ConsumerWhichThrowssubject of type T.
Generally subjects should either be immutable, or the 'ownership' of the product should pass from the caller to the consumer. Particularly, the consumer should not be called with one (mutable) instance more than once.
consume in interface ConsumerWhichThrows<T,EX extends java.lang.Throwable>EX extends java.lang.Throwablepublic void setDelegate(ConsumerWhichThrows<? super T,? extends EX> delegate)
ProxyConsumerWhichThrows(ConsumerWhichThrows) or
setDelegate(ConsumerWhichThrows).