Spec-Zone .ru
спецификации, руководства, описания, API
|
Package | Description |
---|---|
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 |
java.util.stream
|
Modifier and Type | Method and Description |
---|---|
static <T,U extends Comparable<? super U>> |
Comparators.comparing(Function<? super T,? extends U> keyExtractor)
Accepts a function that extracts a
Comparable sort key from a type T , and returns a Comparator<T> that compares by that sort key. |
V |
HashMap.computeIfAbsent(K key,
Function<? super K,? extends V> mappingFunction) |
V |
Hashtable.computeIfAbsent(K key,
Function<? super K,? extends V> mappingFunction) |
default V |
Map.computeIfAbsent(K key,
Function<? super K,? extends V> mappingFunction)
If the specified key is not already associated with a value (or
is mapped to
null ), attempts to compute its value using
the given mapping function and enters it into this map unless
null . |
default <U extends Comparable<? super U>> |
Comparator.thenComparing(Function<? super T,? extends U> keyExtractor)
Constructs a lexicographic order comparator with a function that
extracts a
Comparable key. |
Modifier and Type | Method and Description |
---|---|
<U> CompletableFuture<U> |
CompletableFuture.applyToEither(CompletableFuture<? extends T> other,
Function<? super T,U> fn)
Returns a new CompletableFuture that is completed
when either this or the other given CompletableFuture completes,
with the result of the given function of either this or the other
CompletableFuture's result.
|
<U> CompletableFuture<U> |
CompletableFuture.applyToEitherAsync(CompletableFuture<? extends T> other,
Function<? super T,U> fn)
Returns a new CompletableFuture that is asynchronously completed
when either this or the other given CompletableFuture completes,
with the result of the given function of either this or the other
CompletableFuture's result from a task running in the
ForkJoinPool.commonPool() . |
<U> CompletableFuture<U> |
CompletableFuture.applyToEitherAsync(CompletableFuture<? extends T> other,
Function<? super T,U> fn,
Executor executor)
Returns a new CompletableFuture that is asynchronously completed
when either this or the other given CompletableFuture completes,
with the result of the given function of either this or the other
CompletableFuture's result from a task running in the
given executor.
|
CompletableFuture<T> |
CompletableFuture.exceptionally(Function<Throwable,? extends T> fn)
Returns a new CompletableFuture that is completed when this
CompletableFuture completes, with the result of the given
function of the exception triggering this CompletableFuture's
completion when it completes exceptionally; otherwise, if this
CompletableFuture completes normally, then the returned
CompletableFuture also completes normally with the same value.
|
<U> CompletableFuture<U> |
CompletableFuture.thenApply(Function<? super T,? extends U> fn)
Returns a new CompletableFuture that is completed
when this CompletableFuture completes, with the result of the
given function of this CompletableFuture's result.
|
<U> CompletableFuture<U> |
CompletableFuture.thenApplyAsync(Function<? super T,? extends U> fn)
Returns a new CompletableFuture that is asynchronously completed
when this CompletableFuture completes, with the result of the
given function of this CompletableFuture's result from a
task running in the
ForkJoinPool.commonPool() . |
<U> CompletableFuture<U> |
CompletableFuture.thenApplyAsync(Function<? super T,? extends U> fn,
Executor executor)
Returns a new CompletableFuture that is asynchronously completed
when this CompletableFuture completes, with the result of the
given function of this CompletableFuture's result from a
task running in the given executor.
|
<U> CompletableFuture<U> |
CompletableFuture.thenCompose(Function<? super T,CompletableFuture<U>> fn)
Returns a CompletableFuture that upon completion, has the same
value as produced by the given function of the result of this
CompletableFuture.
|
<U> CompletableFuture<U> |
CompletableFuture.thenComposeAsync(Function<? super T,CompletableFuture<U>> fn)
Returns a CompletableFuture that upon completion, has the same
value as that produced asynchronously using the
ForkJoinPool.commonPool() by the given function of the result
of this CompletableFuture. |
<U> CompletableFuture<U> |
CompletableFuture.thenComposeAsync(Function<? super T,CompletableFuture<U>> fn,
Executor executor)
Returns a CompletableFuture that upon completion, has the same
value as that produced asynchronously using the given executor
by the given function of this CompletableFuture.
|
Modifier and Type | Interface and Description |
---|---|
interface |
UnaryOperator<T>
An operation upon a single operand yielding a result.
|
Modifier and Type | Method and Description |
---|---|
<R> Stream<R> |
DelegatingStream.flatMap(Function<? super T,? extends Stream<? extends R>> mapper) |
<R> Stream<R> |
Stream.flatMap(Function<? super T,? extends Stream<? extends R>> mapper)
Returns a stream consisting of the results of replacing each element of
this stream with the contents of the stream produced by applying the
provided mapping function to each element.
|
DoubleStream |
DelegatingStream.flatMapToDouble(Function<? super T,? extends DoubleStream> mapper) |
DoubleStream |
Stream.flatMapToDouble(Function<? super T,? extends DoubleStream> mapper)
Returns a
DoubleStream consisting of the results of replacing each
element of this stream with the contents of the stream produced
by applying the provided mapping function to each element. |
IntStream |
DelegatingStream.flatMapToInt(Function<? super T,? extends IntStream> mapper) |
IntStream |
Stream.flatMapToInt(Function<? super T,? extends IntStream> mapper)
Returns an
IntStream consisting of the results of replacing each
element of this stream with the contents of the stream produced by
applying the provided mapping function to each element. |
LongStream |
DelegatingStream.flatMapToLong(Function<? super T,? extends LongStream> mapper) |
LongStream |
Stream.flatMapToLong(Function<? super T,? extends LongStream> mapper)
Returns a
LongStream consisting of the results of replacing each
element of this stream with the contents of the stream produced
by applying the provided mapping function to each element. |
static <T,K> Collector<T,Map<K,List<T>>> |
Collectors.groupingBy(Function<? super T,? extends K> classifier)
Returns a
Collector implementing a "group by" operation on
input elements of type T , grouping elements according to a
classification function. |
static <T,K,D> Collector<T,Map<K,D>> |
Collectors.groupingBy(Function<? super T,? extends K> classifier,
Collector<? super T,D> downstream)
Returns a
Collector implementing a cascaded "group by" operation
on input elements of type T , grouping elements according to a
classification function, and then performing a reduction operation on
the values associated with a given key using the specified downstream
Collector . |
static <T,K,D,M extends Map<K,D>> |
Collectors.groupingBy(Function<? super T,? extends K> classifier,
Supplier<M> mapFactory,
Collector<? super T,D> downstream)
Returns a
Collector implementing a cascaded "group by" operation
on input elements of type T , grouping elements according to a
classification function, and then performing a reduction operation on
the values associated with a given key using the specified downstream
Collector . |
static <T,K> Collector<T,ConcurrentMap<K,List<T>>> |
Collectors.groupingByConcurrent(Function<? super T,? extends K> classifier)
Returns a
Collector implementing a concurrent "group by"
operation on input elements of type T , grouping elements
according to a classification function. |
static <T,K,D> Collector<T,ConcurrentMap<K,D>> |
Collectors.groupingByConcurrent(Function<? super T,? extends K> classifier,
Collector<? super T,D> downstream)
Returns a
Collector implementing a concurrent cascaded "group by"
operation on input elements of type T , grouping elements
according to a classification function, and then performing a reduction
operation on the values associated with a given key using the specified
downstream Collector . |
static <T,K,D,M extends ConcurrentMap<K,D>> |
Collectors.groupingByConcurrent(Function<? super T,? extends K> classifier,
Supplier<M> mapFactory,
Collector<? super T,D> downstream)
Returns a concurrent
Collector implementing a cascaded "group by"
operation on input elements of type T , grouping elements
according to a classification function, and then performing a reduction
operation on the values associated with a given key using the specified
downstream Collector . |
<R> Stream<R> |
DelegatingStream.map(Function<? super T,? extends R> mapper) |
<R> Stream<R> |
Stream.map(Function<? super T,? extends R> mapper)
Returns a stream consisting of the results of applying the given
function to the elements of this stream.
|
static <T,U,R> Collector<T,R> |
Collectors.mapping(Function<? super T,? extends U> mapper,
Collector<? super U,R> downstream)
Adapts a
Collector<U,R> to a Collector<T,R> by applying
a mapping function to each input element before accumulation. |
static <T,U> Collector<T,U> |
Collectors.reducing(U identity,
Function<? super T,? extends U> mapper,
BinaryOperator<U> op)
Returns a
Collector<T,U> which performs a reduction of its
input elements under a specified mapping function and
BinaryOperator . |
static <T> Collector<T,Long> |
Collectors.sumBy(Function<? super T,Long> mapper)
Returns a
Collector<T, Long> that produces the sum of a
long-valued function applied to the input element. |
static <T,K,U> Collector<T,ConcurrentMap<K,U>> |
Collectors.toConcurrentMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends U> valueMapper)
Accumulate elements into a
ConcurrentMap whose keys and values
are the result of applying mapping functions to the input elements. |
static <T,K,U> Collector<T,ConcurrentMap<K,U>> |
Collectors.toConcurrentMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends U> valueMapper)
Accumulate elements into a
ConcurrentMap whose keys and values
are the result of applying mapping functions to the input elements. |
static <T,K,U> Collector<T,ConcurrentMap<K,U>> |
Collectors.toConcurrentMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends U> valueMapper,
BinaryOperator<U> mergeFunction)
Accumulate elements into a
ConcurrentMap whose keys and values
are the result of applying mapping functions to the input elements. |
static <T,K,U> Collector<T,ConcurrentMap<K,U>> |
Collectors.toConcurrentMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends U> valueMapper,
BinaryOperator<U> mergeFunction)
Accumulate elements into a
ConcurrentMap whose keys and values
are the result of applying mapping functions to the input elements. |
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)
Accumulate elements into a
ConcurrentMap whose keys and values
are the result of applying mapping functions to the input elements. |
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)
Accumulate elements into a
ConcurrentMap whose keys and values
are the result of applying mapping functions to the input elements. |
static <T,K,U> Collector<T,Map<K,U>> |
Collectors.toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends U> valueMapper)
Accumulate elements into a
Map whose keys and values are the
result of applying mapping functions to the input elements. |
static <T,K,U> Collector<T,Map<K,U>> |
Collectors.toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends U> valueMapper)
Accumulate elements into a
Map whose keys and values are the
result of applying mapping functions to the input elements. |
static <T,K,U> Collector<T,Map<K,U>> |
Collectors.toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends U> valueMapper,
BinaryOperator<U> mergeFunction)
Accumulate elements into a
Map whose keys and values are the
result of applying mapping functions to the input elements. |
static <T,K,U> Collector<T,Map<K,U>> |
Collectors.toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends U> valueMapper,
BinaryOperator<U> mergeFunction)
Accumulate elements into a
Map whose keys and values are the
result of applying mapping functions to the input elements. |
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)
Accumulate elements into a
Map whose keys and values are the
result of applying mapping functions to the input elements. |
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)
Accumulate elements into a
Map whose keys and values are the
result of applying mapping functions to the input elements. |
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 ea-b92