T
- The subject typepublic interface Consumer<T> extends ConsumerWhichThrows<T,NoException>
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.
When using this type in a variable, parameter or field declaration, never write:
Consumer<consumed-type>
, but always:
Consumer<? super consumed-type>
consume
Copyright © 2018 Arno Unkrig. All rights reserved.