Package | Description |
---|---|
java8.lang |
Provides classes for some of the new static methods that were added in Java 8.
|
java8.util |
Provides some of the new
java.util classes and implementations
of static and default interface methods added in Java 8. |
java8.util.concurrent |
The Java 7 and Java 8 utility classes commonly used in concurrent programming.
|
java8.util.function |
Functional interfaces provide target types for lambda expressions
and method references.
|
java8.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 |
---|---|
static <T> void |
Iterables.forEach(Iterable<? extends T> it,
Consumer<? super T> action)
Performs the given action for each element of the passed
Iterable
until all elements have been processed or the action throws an
exception. |
Modifier and Type | Method and Description |
---|---|
void |
Spliterators.AbstractDoubleSpliterator.forEachRemaining(Consumer<? super Double> action)
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 |
Spliterator.OfDouble.forEachRemaining(Consumer<? super Double> action)
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 |
Spliterators.AbstractIntSpliterator.forEachRemaining(Consumer<? super Integer> action)
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 |
Spliterator.OfInt.forEachRemaining(Consumer<? super Integer> action)
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 |
Spliterators.AbstractLongSpliterator.forEachRemaining(Consumer<? super Long> action)
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 |
Spliterator.OfLong.forEachRemaining(Consumer<? super Long> action)
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 |
Spliterators.AbstractSpliterator.forEachRemaining(Consumer<? super T> action)
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 |
Spliterator.forEachRemaining(Consumer<? super T> action)
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.
|
static <E> void |
Iterators.forEachRemaining(Iterator<E> it,
Consumer<? super E> action)
Performs the given action for each remaining element until all elements
have been processed or the action throws an exception.
|
static void |
Spliterators.OfDouble.forEachRemaining(Spliterator.OfDouble this_,
Consumer<? super Double> action)
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.
|
static void |
Spliterators.OfInt.forEachRemaining(Spliterator.OfInt this_,
Consumer<? super Integer> action)
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.
|
static void |
Spliterators.OfLong.forEachRemaining(Spliterator.OfLong this_,
Consumer<? super Long> action)
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.
|
static <T> void |
Spliterators.forEachRemaining(Spliterator<T> this_,
Consumer<? super T> action)
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<? super T> action)
If a value is present, perform the given action with the value,
otherwise do nothing.
|
void |
Optional.ifPresentOrElse(Consumer<? super T> action,
Runnable emptyAction)
If a value is present, perform the given action with the value,
otherwise perform the given empty-based action.
|
boolean |
Spliterator.OfDouble.tryAdvance(Consumer<? super Double> action)
If a remaining element exists, performs the given action on it,
returning
true ; else returns false . |
boolean |
Spliterator.OfInt.tryAdvance(Consumer<? super Integer> action)
If a remaining element exists, performs the given action on it,
returning
true ; else returns false . |
boolean |
Spliterator.OfLong.tryAdvance(Consumer<? super Long> action)
If a remaining element exists, performs the given action on it,
returning
true ; else returns false . |
boolean |
Spliterator.tryAdvance(Consumer<? super T> action)
If a remaining element exists, performs the given action on it,
returning
true ; else returns false . |
static boolean |
Spliterators.OfDouble.tryAdvance(Spliterator.OfDouble this_,
Consumer<? super Double> action)
If a remaining element exists, performs the given action on it,
returning
true ; else returns false . |
static boolean |
Spliterators.OfInt.tryAdvance(Spliterator.OfInt this_,
Consumer<? super Integer> action)
If a remaining element exists, performs the given action on it,
returning
true ; else returns false . |
static boolean |
Spliterators.OfLong.tryAdvance(Spliterator.OfLong this_,
Consumer<? super Long> action)
If a remaining element exists, performs the given action on it,
returning
true ; else returns false . |
Modifier and Type | Method and Description |
---|---|
CompletionStage<Void> |
CompletionStage.acceptEither(CompletionStage<? extends T> other,
Consumer<? super T> action)
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<Void> |
CompletableFuture.acceptEither(CompletionStage<? extends T> other,
Consumer<? super T> action) |
CompletionStage<Void> |
CompletionStage.acceptEitherAsync(CompletionStage<? extends T> other,
Consumer<? super T> action)
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<Void> |
CompletableFuture.acceptEitherAsync(CompletionStage<? extends T> other,
Consumer<? super T> action) |
CompletionStage<Void> |
CompletionStage.acceptEitherAsync(CompletionStage<? extends T> other,
Consumer<? super T> action,
Executor executor)
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<Void> |
CompletableFuture.acceptEitherAsync(CompletionStage<? extends T> other,
Consumer<? super T> action,
Executor executor) |
CompletionStage<Void> |
CompletionStage.thenAccept(Consumer<? super T> action)
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<Void> |
CompletableFuture.thenAccept(Consumer<? super T> action) |
CompletionStage<Void> |
CompletionStage.thenAcceptAsync(Consumer<? super T> action)
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<Void> |
CompletableFuture.thenAcceptAsync(Consumer<? super T> action) |
CompletionStage<Void> |
CompletionStage.thenAcceptAsync(Consumer<? super T> action,
Executor executor)
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<Void> |
CompletableFuture.thenAcceptAsync(Consumer<? super T> action,
Executor executor) |
Modifier and Type | Method and Description |
---|---|
static <T> Consumer<T> |
Consumers.andThen(Consumer<? super T> this_,
Consumer<? super T> after)
Returns a composed
Consumer that performs, in sequence, the this_
operation followed by the after operation. |
Modifier and Type | Method and Description |
---|---|
static <T> Consumer<T> |
Consumers.andThen(Consumer<? super T> this_,
Consumer<? super T> after)
Returns a composed
Consumer that performs, in sequence, the this_
operation followed by the after operation. |
static <T> Consumer<T> |
Consumers.andThen(Consumer<? super T> this_,
Consumer<? super T> after)
Returns a composed
Consumer that performs, in sequence, the this_
operation followed by the after operation. |
Modifier and Type | Interface and Description |
---|---|
static interface |
Stream.Builder<T>
A mutable builder for a
Stream . |
Modifier and Type | Method and Description |
---|---|
void |
Stream.forEach(Consumer<? super T> action)
Performs an action for each element of this stream.
|
void |
Stream.forEachOrdered(Consumer<? super T> action)
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<T> |
Stream.peek(Consumer<? super T> action)
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.
|
Copyright © 2015. All rights reserved.