软件包 | 描述 |
---|---|
java.lang |
提供对java编程语言的设计基础课。
|
java.util |
包含集合框架、遗留的集合类、事件模型、日期和时间的设施、国际化和各种实用工具类(一个字符串标记,一个随机数发生器,和一位阵列)。
|
java.util.concurrent |
在并发编程中常用的实用类。
|
java.util.function |
功能接口提供目标类型的lambda表达式和方法参考。
|
java.util.stream |
类,以支持元素流上的功能样式操作,如Map减少集合上的转换。
|
Modifier and Type | Method and Description |
---|---|
default void |
Iterable.forEach(Consumer<? super T> action)
执行特定动作的每一个元素的
Iterable 直到所有元素都被处理或操作抛出异常。
|
Modifier and Type | Method and Description |
---|---|
void |
ArrayList.forEach(Consumer<? super E> action) |
void |
Vector.forEach(Consumer<? super E> action) |
default void |
Spliterator.OfDouble.forEachRemaining(Consumer<? super Double> action)
对每个剩余元素执行给定的操作,在当前线程中顺序执行,直到所有的元素都被处理或操作抛出异常。
|
default void |
PrimitiveIterator.OfDouble.forEachRemaining(Consumer<? super Double> action)
执行给定的每个剩余元素的动作,直到所有的元素都被处理或操作抛出异常。
|
default void |
Iterator.forEachRemaining(Consumer<? super E> action)
执行给定的每个剩余元素的动作,直到所有的元素都被处理或操作抛出异常。
|
default void |
Spliterator.OfInt.forEachRemaining(Consumer<? super Integer> action)
对每个剩余元素执行给定的操作,在当前线程中顺序执行,直到所有的元素都被处理或操作抛出异常。
|
default void |
PrimitiveIterator.OfInt.forEachRemaining(Consumer<? super Integer> action)
执行给定的每个剩余元素的动作,直到所有的元素都被处理或操作抛出异常。
|
default void |
Spliterator.OfLong.forEachRemaining(Consumer<? super Long> action)
对每个剩余元素执行给定的操作,在当前线程中顺序执行,直到所有的元素都被处理或操作抛出异常。
|
default void |
PrimitiveIterator.OfLong.forEachRemaining(Consumer<? super Long> action)
执行给定的每个剩余元素的动作,直到所有的元素都被处理或操作抛出异常。
|
default void |
Spliterator.forEachRemaining(Consumer<? super T> action)
对每个剩余元素执行给定的操作,在当前线程中顺序执行,直到所有的元素都被处理或操作抛出异常。
|
void |
Optional.ifPresent(Consumer<? super T> consumer)
如果一个值存在,调用指定的值的指定的用户,否则什么都不做。
|
default boolean |
Spliterator.OfDouble.tryAdvance(Consumer<? super Double> action)
如果剩余的元素存在,执行特定动作的话,还
true ;否则返回
false 。
|
default boolean |
Spliterator.OfInt.tryAdvance(Consumer<? super Integer> action)
如果剩余的元素存在,执行特定动作的话,还
true ;否则返回
false 。
|
default boolean |
Spliterator.OfLong.tryAdvance(Consumer<? super Long> action)
如果剩余的元素存在,执行特定动作的话,还
true ;否则返回
false 。
|
boolean |
Spliterator.tryAdvance(Consumer<? super T> action)
如果剩余的元素存在,执行特定动作的话,还
true ;否则返回
false 。
|
Modifier and Type | Method and Description |
---|---|
CompletionStage<Void> |
CompletionStage.acceptEither(CompletionStage<? extends T> other, Consumer<? super T> action)
返回一个新的completionstage,当这种或其他特定阶段的正常完成,执行相应的结果作为参数提供的行动。
|
CompletableFuture<Void> |
CompletableFuture.acceptEither(CompletionStage<? extends T> other, Consumer<? super T> action) |
CompletionStage<Void> |
CompletionStage.acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action)
返回一个新的completionstage,当这种或其他特定阶段的正常完成,利用这个阶段的默认的异步执行机构执行,与相应的结果作为参数提供的行动。
|
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)
返回一个新的completionstage,当这种或其他特定阶段的正常完成,使用提供的遗嘱执行人执行,与相应的结果作为参数提供的功能。
|
CompletableFuture<Void> |
CompletableFuture.acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor) |
void |
CopyOnWriteArraySet.forEach(Consumer<? super E> action) |
void |
CopyOnWriteArrayList.forEach(Consumer<? super E> action) |
void |
ConcurrentHashMap.KeySetView.forEach(Consumer<? super K> action) |
<U> void |
ConcurrentHashMap.forEach(long parallelismThreshold, BiFunction<? super K,? super V,? extends U> transformer, Consumer<? super U> action)
执行每个非空转换的给定动作(键,值)。
|
void |
ConcurrentHashMap.forEachEntry(long parallelismThreshold, Consumer<? super Map.Entry<K,V>> action)
为每个条目执行给定的操作。
|
<U> void |
ConcurrentHashMap.forEachEntry(long parallelismThreshold, Function<Map.Entry<K,V>,? extends U> transformer, Consumer<? super U> action)
对每个条目的每个非空转换执行给定的操作。
|
void |
ConcurrentHashMap.forEachKey(long parallelismThreshold, Consumer<? super K> action)
为每个键执行给定的动作。
|
<U> void |
ConcurrentHashMap.forEachKey(long parallelismThreshold, Function<? super K,? extends U> transformer, Consumer<? super U> action)
对每个键的每个非空转换执行给定的操作。
|
void |
ConcurrentHashMap.forEachValue(long parallelismThreshold, Consumer<? super V> action)
为每个值执行给定的动作。
|
<U> void |
ConcurrentHashMap.forEachValue(long parallelismThreshold, Function<? super V,? extends U> transformer, Consumer<? super U> action)
对每个值的每个非空转换执行给定的操作。
|
CompletionStage<Void> |
CompletionStage.thenAccept(Consumer<? super T> action)
返回一个新的completionstage,当此阶段完成正常的情况下,执行这一阶段的结果作为参数提供的行动。
|
CompletableFuture<Void> |
CompletableFuture.thenAccept(Consumer<? super T> action) |
CompletionStage<Void> |
CompletionStage.thenAcceptAsync(Consumer<? super T> action)
返回一个新的completionstage,当此阶段完成这个阶段通常使用默认的异步执行机构执行,这一阶段的结果作为参数提供的行动。
|
CompletableFuture<Void> |
CompletableFuture.thenAcceptAsync(Consumer<? super T> action) |
CompletionStage<Void> |
CompletionStage.thenAcceptAsync(Consumer<? super T> action, Executor executor)
返回一个新的completionstage,当此阶段完成通常是使用提供的遗嘱执行人执行,这个阶段的结果作为参数提供的行动。
|
CompletableFuture<Void> |
CompletableFuture.thenAcceptAsync(Consumer<? super T> action, Executor executor) |
Modifier and Type | Method and Description |
---|---|
default Consumer<T> |
Consumer.andThen(Consumer<? super T> after)
返回一个由
Consumer 执行此操作,在序列,其次是
after 操作。
|
Modifier and Type | Method and Description |
---|---|
default Consumer<T> |
Consumer.andThen(Consumer<? super T> after)
返回一个由
Consumer 执行此操作,在序列,其次是
after 操作。
|
Modifier and Type | Interface and Description |
---|---|
static interface |
Stream.Builder<T>
一
Stream 易变的建设者。
|
Modifier and Type | Method and Description |
---|---|
void |
Stream.forEach(Consumer<? super T> action)
对该流的每个元素执行一个动作。
|
void |
Stream.forEachOrdered(Consumer<? super T> action)
对该流的每个元素执行一个操作,如果流有一个定义的遇到顺序,则在该流的遇到顺序中执行一个动作。
|
Stream<T> |
Stream.peek(Consumer<? super T> action)
返回由该流的元素组成的流,并在所提供的流中执行所提供的每个元素上的动作。
|
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, 2014, Oracle and/or its affiliates. All rights reserved.