@FunctionalInterface public interface IntConsumer
Consumer
for int
.
Unlike most other functional interfaces, IntConsumer
is expected to
operate via side-effects.Consumer
Modifier and Type | Method and Description |
---|---|
void |
accept(int value)
Accept an input value.
|
default IntConsumer |
chain(IntConsumer other)
Returns an
IntConsumer which performs, in sequence, the operation
represented by this object followed by the operation represented by
another IntConsumer . |
void accept(int value)
value
- the input valuedefault IntConsumer chain(IntConsumer other)
IntConsumer
which performs, in sequence, the operation
represented by this object followed by the operation represented by
another IntConsumer
.
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
- an IntConsumer which will be chained after this
IntConsumeraccept
method
of this IntConsumer and the accept
method of the specified IntConsumer
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