| Package | Description |
|---|---|
| java.lang |
Provides classes that are fundamental to the design of the Java programming language.
|
| java.util |
Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
|
| java.util.concurrent |
Utility classes commonly useful in concurrent programming.
|
| java.util.function |
Functional interfaces provide target types for lambda expressions and method references.
|
| java.util.stream |
Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.
|
| Modifier and Type | Method and Description |
|---|---|
default void |
Iterable.forEach(Consumer
Performs the given action for each element of the
Iterable until all elements have been processed or the action throws an exception.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Vector.forEach(Consumer
|
void |
ArrayList.forEach(Consumer
|
default void |
Spliterator.OfDouble.forEachRemaining(Consumer
Performs the given action for each remaining element, sequentially in the current thread, until all elements have been processed or the action throws an exception.
|
default void |
PrimitiveIterator.OfDouble.forEachRemaining(Consumer
Performs the given action for each remaining element until all elements have been processed or the action throws an exception.
|
default void |
Iterator.forEachRemaining(Consumer
Performs the given action for each remaining element until all elements have been processed or the action throws an exception.
|
default void |
Spliterator.OfInt.forEachRemaining(Consumer
Performs the given action for each remaining element, sequentially in the current thread, until all elements have been processed or the action throws an exception.
|
default void |
PrimitiveIterator.OfInt.forEachRemaining(Consumer
Performs the given action for each remaining element until all elements have been processed or the action throws an exception.
|
default void |
Spliterator.OfLong.forEachRemaining(Consumer
Performs the given action for each remaining element, sequentially in the current thread, until all elements have been processed or the action throws an exception.
|
default void |
PrimitiveIterator.OfLong.forEachRemaining(Consumer
Performs the given action for each remaining element until all elements have been processed or the action throws an exception.
|
default void |
Spliterator.forEachRemaining(Consumer
Performs the given action for each remaining element, sequentially in the current thread, until all elements have been processed or the action throws an exception.
|
void |
Optional.ifPresent(Consumer
If a value is present, invoke the specified consumer with the value, otherwise do nothing.
|
default boolean |
Spliterator.OfDouble.tryAdvance(Consumer
If a remaining element exists, performs the given action on it, returning
true; else returns
false.
|
default boolean |
Spliterator.OfInt.tryAdvance(Consumer
If a remaining element exists, performs the given action on it, returning
true; else returns
false.
|
default boolean |
Spliterator.OfLong.tryAdvance(Consumer
If a remaining element exists, performs the given action on it, returning
true; else returns
false.
|
boolean |
Spliterator.tryAdvance(Consumer
If a remaining element exists, performs the given action on it, returning
true; else returns
false.
|
| Modifier and Type | Method and Description |
|---|---|
CompletionStage |
CompletionStage.acceptEither(CompletionStage
Returns a new CompletionStage that, when either this or the other given stage complete normally, is executed with the corresponding result as argument to the supplied action.
|
CompletableFuture |
CompletableFuture.acceptEither(CompletionStage
|
CompletionStage |
CompletionStage.acceptEitherAsync(CompletionStage
Returns a new CompletionStage that, when either this or the other given stage complete normally, is executed using this stage's default asynchronous execution facility, with the corresponding result as argument to the supplied action.
|
CompletableFuture |
CompletableFuture.acceptEitherAsync(CompletionStage
|
CompletionStage |
CompletionStage.acceptEitherAsync(CompletionStage
Returns a new CompletionStage that, when either this or the other given stage complete normally, is executed using the supplied executor, with the corresponding result as argument to the supplied function.
|
CompletableFuture |
CompletableFuture.acceptEitherAsync(CompletionStage
|
void |
CopyOnWriteArraySet.forEach(Consumer
|
void |
CopyOnWriteArrayList.forEach(Consumer
|
void |
ConcurrentHashMap.KeySetView.forEach(Consumer
|
<U> void |
ConcurrentHashMap.forEach(long parallelismThreshold, BiFunction
Performs the given action for each non-null transformation of each (key, value).
|
void |
ConcurrentHashMap.forEachEntry(long parallelismThreshold, Consumer
Performs the given action for each entry.
|
<U> void |
ConcurrentHashMap.forEachEntry(long parallelismThreshold, Function
Performs the given action for each non-null transformation of each entry.
|
void |
ConcurrentHashMap.forEachKey(long parallelismThreshold, Consumer
Performs the given action for each key.
|
<U> void |
ConcurrentHashMap.forEachKey(long parallelismThreshold, Function
Performs the given action for each non-null transformation of each key.
|
void |
ConcurrentHashMap.forEachValue(long parallelismThreshold, Consumer
Performs the given action for each value.
|
<U> void |
ConcurrentHashMap.forEachValue(long parallelismThreshold, Function
Performs the given action for each non-null transformation of each value.
|
CompletionStage |
CompletionStage.thenAccept(Consumer
Returns a new CompletionStage that, when this stage completes normally, is executed with this stage's result as the argument to the supplied action.
|
CompletableFuture |
CompletableFuture.thenAccept(Consumer
|
CompletionStage |
CompletionStage.thenAcceptAsync(Consumer
Returns a new CompletionStage that, when this stage completes normally, is executed using this stage's default asynchronous execution facility, with this stage's result as the argument to the supplied action.
|
CompletableFuture |
CompletableFuture.thenAcceptAsync(Consumer
|
CompletionStage |
CompletionStage.thenAcceptAsync(Consumer
Returns a new CompletionStage that, when this stage completes normally, is executed using the supplied Executor, with this stage's result as the argument to the supplied action.
|
CompletableFuture |
CompletableFuture.thenAcceptAsync(Consumer
|
| Modifier and Type | Method and Description |
|---|---|
default Consumer |
Consumer.andThen(Consumer
Returns a composed
Consumer that performs, in sequence, this operation followed by the
after operation.
|
| Modifier and Type | Method and Description |
|---|---|
default Consumer |
Consumer.andThen(Consumer
Returns a composed
Consumer that performs, in sequence, this operation followed by the
after operation.
|
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Stream
A mutable builder for a
Stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Stream.forEach(Consumer
Performs an action for each element of this stream.
|
void |
Stream.forEachOrdered(Consumer
Performs an action for each element of this stream, in the encounter order of the stream if the stream has a defined encounter order.
|
Stream |
Stream.peek(Consumer
Returns a stream consisting of the elements of this stream, additionally performing the provided action on each element as elements are consumed from the resulting stream.
|