软件包 | 描述 |
---|---|
java.lang |
提供对java编程语言的设计基础课。
|
java.util |
包含集合框架、遗留的集合类、事件模型、日期和时间的设施、国际化和各种实用工具类(一个字符串标记,一个随机数发生器,和一位阵列)。
|
java.util.concurrent |
在并发编程中常用的实用类。
|
java.util.logging |
提供类和java 2平台的核心
TM测井设备接口。
|
java.util.stream |
类,以支持元素流上的功能样式操作,如Map减少集合上的转换。
|
Modifier and Type | Method and Description |
---|---|
static <S> ThreadLocal<S> |
ThreadLocal.withInitial(Supplier<? extends S> supplier)
创建一个线程局部变量。
|
Modifier and Type | Method and Description |
---|---|
T |
Optional.orElseGet(Supplier<? extends T> other)
如果目前的返回值,否则调用
other 并返回调用结果的。
|
<X extends Throwable> |
Optional.orElseThrow(Supplier<? extends X> exceptionSupplier)
返回所包含的值,如果存在的话,否则抛出一个由提供的供应商创建的异常。
|
<X extends Throwable> |
OptionalDouble.orElseThrow(Supplier<X> exceptionSupplier)
返回所包含的值,如果存在的话,否则抛出一个由提供的供应商创建的异常。
|
<X extends Throwable> |
OptionalInt.orElseThrow(Supplier<X> exceptionSupplier)
返回所包含的值,如果存在的话,否则抛出一个由提供的供应商创建的异常。
|
<X extends Throwable> |
OptionalLong.orElseThrow(Supplier<X> exceptionSupplier)
返回所包含的值,如果存在的话,否则抛出一个由提供的供应商创建的异常。
|
static <T> T |
Objects.requireNonNull(T obj, Supplier<String> messageSupplier)
检查指定的对象的引用是不
null 抛
NullPointerException 如果是定制的。
|
Modifier and Type | Method and Description |
---|---|
static <U> CompletableFuture<U> |
CompletableFuture.supplyAsync(Supplier<U> supplier)
返回一个新的completablefuture是由任务通过调用给定的供应商获得的价值
ForkJoinPool.commonPool() 异步运行完成。
|
static <U> CompletableFuture<U> |
CompletableFuture.supplyAsync(Supplier<U> supplier, Executor executor)
返回一个新的completablefuture是由任务在给定的执行器通过调用给定的供应商获得的值异步运行完成。
|
Modifier and Type | Method and Description |
---|---|
void |
Logger.config(Supplier<String> msgSupplier)
记录一个配置消息,如果日志记录级别是这样的,则该消息将被记录下来。
|
void |
Logger.fine(Supplier<String> msgSupplier)
记录一个好消息,如果日志级别是这样的话,该消息将被记录下来。
|
void |
Logger.finer(Supplier<String> msgSupplier)
日志一个更细的消息,这是只有被构造,如果日志记录级别是这样的消息将实际上被记录。
|
void |
Logger.finest(Supplier<String> msgSupplier)
如果日志记录级别是这样的消息将被记录的话,将被构造为最好的消息,这是唯一的构造。
|
void |
Logger.info(Supplier<String> msgSupplier)
记录一个信息消息,如果日志记录级别是这样的,则该消息将被记录下来。
|
void |
Logger.log(Level level, Supplier<String> msgSupplier)
记录一个消息,如果日志记录级别是这样的,则该消息将被记录下来。
|
void |
Logger.log(Level level, Throwable thrown, Supplier<String> msgSupplier)
日志一懒洋洋地构造的消息相关的错误信息。
|
void |
Logger.logp(Level level, String sourceClass, String sourceMethod, Supplier<String> msgSupplier)
懒洋洋地构建日志消息,指定源的类和方法,不带参数。
|
void |
Logger.logp(Level level, String sourceClass, String sourceMethod, Throwable thrown, Supplier<String> msgSupplier)
懒洋洋地构建日志消息,指定源的类和方法,与相关的错误信息。
|
void |
Logger.severe(Supplier<String> msgSupplier)
记录一个严重的消息,如果日志记录级别是这样的,则该消息将被记录下来。
|
void |
Logger.warning(Supplier<String> msgSupplier)
记录一个警告消息,如果日志级别是这样的,则该消息将被记录下来。
|
Modifier and Type | Method and Description |
---|---|
Supplier<A> |
Collector.supplier()
一个函数创建并返回一个新的结果的容器。
|
Modifier and Type | Method and Description |
---|---|
<R> R |
Stream.collect(Supplier<R> supplier, BiConsumer<R,? super T> accumulator, BiConsumer<R,R> combiner)
执行该流的元素
mutable reduction操作。
|
<R> R |
DoubleStream.collect(Supplier<R> supplier, ObjDoubleConsumer<R> accumulator, BiConsumer<R,R> combiner)
执行该流的元素
mutable reduction操作。
|
<R> R |
IntStream.collect(Supplier<R> supplier, ObjIntConsumer<R> accumulator, BiConsumer<R,R> combiner)
执行该流的元素
mutable reduction操作。
|
<R> R |
LongStream.collect(Supplier<R> supplier, ObjLongConsumer<R> accumulator, BiConsumer<R,R> combiner)
执行该流的元素
mutable reduction操作。
|
static DoubleStream |
StreamSupport.doubleStream(Supplier<? extends Spliterator.OfDouble> supplier, int characteristics, boolean parallel)
创建一个新的顺序或并行从
Supplier 的
Spliterator.OfDouble
DoubleStream 。
|
static <T> Stream<T> |
Stream.generate(Supplier<T> s)
返回一个无穷序列无序流,其中每个元素是由提供
Supplier 生成。
|
static <T,K,D,A,M extends Map<K,D>> |
Collectors.groupingBy(Function<? super T,? extends K> classifier, Supplier<M> mapFactory, Collector<? super T,A,D> downstream)
返回一个实现级联的“组”操作
Collector
T 型输入元素,元素分组根据分类功能,然后执行还原操作对一个给定的键使用指定的下游
Collector 关联的值。
|
static <T,K,A,D,M extends ConcurrentMap<K,D>> |
Collectors.groupingByConcurrent(Function<? super T,? extends K> classifier, Supplier<M> mapFactory, Collector<? super T,A,D> downstream)
返回一个
Collector 实施并行级联”组的“
T 型要素投入运作,分组元素按一个分类函数,然后执行还原操作对一个给定的键使用指定的下游
Collector 关联的值。
|
static IntStream |
StreamSupport.intStream(Supplier<? extends Spliterator.OfInt> supplier, int characteristics, boolean parallel)
创建一个新的顺序或并行从
Supplier 的
Spliterator.OfInt
IntStream 。
|
static LongStream |
StreamSupport.longStream(Supplier<? extends Spliterator.OfLong> supplier, int characteristics, boolean parallel)
创建一个新的顺序或并行从
Supplier 的
Spliterator.OfLong
LongStream 。
|
static <T,A,R> Collector<T,A,R> |
Collector.of(Supplier<A> supplier, BiConsumer<A,T> accumulator, BinaryOperator<A> combiner, Function<A,R> finisher, Collector.Characteristics... characteristics)
返回一个新的
Collector 由给定的
supplier ,
accumulator ,
combiner 描述,和
finisher 功能。
|
static <T,R> Collector<T,R,R> |
Collector.of(Supplier<R> supplier, BiConsumer<R,T> accumulator, BinaryOperator<R> combiner, Collector.Characteristics... characteristics)
返回一个新的
Collector 由给定的
supplier ,
accumulator 描述,和
combiner 功能。
|
static <T> Stream<T> |
StreamSupport.stream(Supplier<? extends Spliterator<T>> supplier, int characteristics, boolean parallel)
创建一个新的顺序或并行从
Supplier 的
Spliterator
Stream 。
|
static <T,C extends Collection<T>> |
Collectors.toCollection(Supplier<C> collectionFactory)
返回一个
Collector 积累输入元素到一个新的
Collection ,在遭遇订单。
|
static <T,K,U,M extends ConcurrentMap<K,U>> |
Collectors.toConcurrentMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends U> valueMapper, BinaryOperator<U> mergeFunction, Supplier<M> mapSupplier)
返回一个并发
Collector 积累成
ConcurrentMap 元素的键和值是应用提供的函数映射到输入元素的结果。
|
static <T,K,U,M extends Map<K,U>> |
Collectors.toMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends U> valueMapper, BinaryOperator<U> mergeFunction, Supplier<M> mapSupplier)
返回一个
Collector 积累成一个
Map 元素的键和值是应用提供的函数映射到输入元素的结果。
|
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.