T
- the type of the first argument to the accept
operationU
- the type of the second argument to the accept
operation@FunctionalInterface public interface BiConsumer<T,U>
Consumer
. Unlike most other
functional interfaces, BiConsumer
is expected to operate via
side-effects.Consumer
Modifier and Type | Method and Description |
---|---|
void |
accept(T t,
U u)
Performs operations upon the provided objects which may modify those
objects and/or external state.
|
default BiConsumer<T,U> |
chain(BiConsumer<? super T,? super U> other)
Returns a
BiConsumer which performs, in sequence, the operation
represented by this object followed by the operation represented by
the other BiConsumer . |
void accept(T t, U u)
t
- an input objectu
- an input objectdefault BiConsumer<T,U> chain(BiConsumer<? super T,? super U> other)
BiConsumer
which performs, in sequence, the operation
represented by this object followed by the operation represented by
the other BiConsumer
.
Any exceptions thrown by either accept
method are relayed
to the caller; if performing this operation throws an exception, the
other operation will not be performed.
other
- a BiConsumer which will be chained after this BiConsumeraccept
method
of this BiConsumer and the accept
method of the specified
BiConsumer operationNullPointerException
- if other is null Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2013, Oracle and/or its affiliates. All rights reserved.
DRAFT internal-0