| Package | Description |
|---|---|
| java.security |
Provides the classes and interfaces for the security framework.
|
| 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 |
|---|---|
Object |
Provider.computeIfAbsent(Object
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.
|
| Modifier and Type | Method and Description |
|---|---|
static <T |
Comparator.comparing(Function
Accepts a function that extracts a
Comparable sort key from a type
T, and returns a
Comparator<T> that compares by that sort key.
|
static <T |
Comparator.comparing(Function
Accepts a function that extracts a sort key from a type
T, and returns a
Comparator<T> that compares by that sort key using the specified
Comparator.
|
default V |
Map.computeIfAbsent(K key, Function
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.
|
V |
HashMap.computeIfAbsent(K key, Function
|
V |
Hashtable.computeIfAbsent(K key, Function
|
<U> Optional |
Optional.flatMap(Function
If a value is present, apply the provided
Optional-bearing mapping function to it, return that result, otherwise return an empty
Optional.
|
<U> Optional |
Optional.map(Function
If a value is present, apply the provided mapping function to it, and if the result is non-null, return an
Optional describing the result.
|
default <U extends Comparable |
Comparator.thenComparing(Function
Returns a lexicographic-order comparator with a function that extracts a
Comparable sort key.
|
default <U> Comparator |
Comparator.thenComparing(Function
Returns a lexicographic-order comparator with a function that extracts a key to be compared with the given
Comparator.
|
| Modifier and Type | Method and Description |
|---|---|
<U> CompletionStage |
CompletionStage.applyToEither(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 function.
|
<U> CompletableFuture |
CompletableFuture.applyToEither(CompletionStage
|
<U> CompletionStage |
CompletionStage.applyToEitherAsync(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 function.
|
<U> CompletableFuture |
CompletableFuture.applyToEitherAsync(CompletionStage
|
<U> CompletionStage |
CompletionStage.applyToEitherAsync(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.
|
<U> CompletableFuture |
CompletableFuture.applyToEitherAsync(CompletionStage
|
V |
ConcurrentHashMap.computeIfAbsent(K key, Function
If the specified key is not already associated with a value, attempts to compute its value using the given mapping function and enters it into this map unless
null.
|
V |
ConcurrentSkipListMap.computeIfAbsent(K key, Function
If the specified key is not already associated with a value, attempts to compute its value using the given mapping function and enters it into this map unless
null.
|
default V |
ConcurrentMap.computeIfAbsent(K key, Function
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.
|
CompletionStage |
CompletionStage.exceptionally(Function
Returns a new CompletionStage that, when this stage completes exceptionally, is executed with this stage's exception as the argument to the supplied function.
|
CompletableFuture |
CompletableFuture.exceptionally(Function
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> void |
ConcurrentHashMap.forEachEntry(long parallelismThreshold, Function
Performs the given action for each non-null transformation of each entry.
|
<U> void |
ConcurrentHashMap.forEachKey(long parallelismThreshold, Function
Performs the given action for each non-null transformation of each key.
|
<U> void |
ConcurrentHashMap.forEachValue(long parallelismThreshold, Function
Performs the given action for each non-null transformation of each value.
|
<U> U |
ConcurrentHashMap.reduceEntries(long parallelismThreshold, Function
Returns the result of accumulating the given transformation of all entries using the given reducer to combine values, or null if none.
|
<U> U |
ConcurrentHashMap.reduceKeys(long parallelismThreshold, Function
Returns the result of accumulating the given transformation of all keys using the given reducer to combine values, or null if none.
|
<U> U |
ConcurrentHashMap.reduceValues(long parallelismThreshold, Function
Returns the result of accumulating the given transformation of all values using the given reducer to combine values, or null if none.
|
<U> U |
ConcurrentHashMap.searchEntries(long parallelismThreshold, Function
Returns a non-null result from applying the given search function on each entry, or null if none.
|
<U> U |
ConcurrentHashMap.searchKeys(long parallelismThreshold, Function
Returns a non-null result from applying the given search function on each key, or null if none.
|
<U> U |
ConcurrentHashMap.searchValues(long parallelismThreshold, Function
Returns a non-null result from applying the given search function on each value, or null if none.
|
<U> CompletionStage |
CompletionStage.thenApply(Function
Returns a new CompletionStage that, when this stage completes normally, is executed with this stage's result as the argument to the supplied function.
|
<U> CompletableFuture |
CompletableFuture.thenApply(Function
|
<U> CompletionStage |
CompletionStage.thenApplyAsync(Function
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 function.
|
<U> CompletableFuture |
CompletableFuture.thenApplyAsync(Function
|
<U> CompletionStage |
CompletionStage.thenApplyAsync(Function
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 function.
|
<U> CompletableFuture |
CompletableFuture.thenApplyAsync(Function
|
<U> CompletionStage |
CompletionStage.thenCompose(Function
Returns a new CompletionStage that, when this stage completes normally, is executed with this stage as the argument to the supplied function.
|
<U> CompletableFuture |
CompletableFuture.thenCompose(Function
|
<U> CompletionStage |
CompletionStage.thenComposeAsync(Function
Returns a new CompletionStage that, when this stage completes normally, is executed using this stage's default asynchronous execution facility, with this stage as the argument to the supplied function.
|
<U> CompletableFuture |
CompletableFuture.thenComposeAsync(Function
|
<U> CompletionStage |
CompletionStage.thenComposeAsync(Function
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 function.
|
<U> CompletableFuture |
CompletableFuture.thenComposeAsync(Function
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
UnaryOperator<T>
Represents an operation on a single operand that produces a result of the same type as its operand.
|
| Modifier and Type | Method and Description |
|---|---|
default <V> Function |
Function.andThen(Function
Returns a composed function that first applies this function to its input, and then applies the
after function to the result.
|
default <V> Function |
Function.compose(Function
Returns a composed function that first applies the
before function to its input, and then applies this function to the result.
|
static <T> Function |
Function.identity()
Returns a function that always returns its input argument.
|
| Modifier and Type | Method and Description |
|---|---|
default <V> BiFunction |
BiFunction.andThen(Function
Returns a composed function that first applies this function to its input, and then applies the
after function to the result.
|
default <V> Function |
Function.andThen(Function
Returns a composed function that first applies this function to its input, and then applies the
after function to the result.
|
default <V> Function |
Function.compose(Function
Returns a composed function that first applies the
before function to its input, and then applies this function to the result.
|
| Modifier and Type | Method and Description |
|---|---|
Function |
Collector.finisher()
Perform the final transformation from the intermediate accumulation type
A to the final result type
R.
|
| Modifier and Type | Method and Description |
|---|---|
static <T |
Collectors.collectingAndThen(Collector
Adapts a
Collector to perform an additional finishing transformation.
|
<R> Stream |
Stream.flatMap(Function
Returns a stream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to each element.
|
DoubleStream |
Stream.flatMapToDouble(Function
Returns an
DoubleStream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to each element.
|
IntStream |
Stream.flatMapToInt(Function
Returns an
IntStream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to each element.
|
LongStream |
Stream.flatMapToLong(Function
Returns an
LongStream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to each element.
|
static <T |
Collectors.groupingBy(Function
Returns a
Collector implementing a "group by" operation on input elements of type
T, grouping elements according to a classification function, and returning the results in a
Map.
|
static <T |
Collectors.groupingBy(Function
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 |
Collectors.groupingBy(Function
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 |
Collectors.groupingByConcurrent(Function
Returns a concurrent
Collector implementing a "group by" operation on input elements of type
T, grouping elements according to a classification function.
|
static <T |
Collectors.groupingByConcurrent(Function
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.
|
static <T |
Collectors.groupingByConcurrent(Function
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 |
Stream.map(Function
Returns a stream consisting of the results of applying the given function to the elements of this stream.
|
static <T |
Collectors.mapping(Function
Adapts a
Collector accepting elements of type
U to one accepting elements of type
T by applying a mapping function to each input element before accumulation.
|
static <T |
Collector.of(Supplier
Returns a new
Collector described by the given
supplier,
accumulator,
combiner, and
finisher functions.
|
static <T |
Collectors.reducing(U identity, Function
Returns a
Collector which performs a reduction of its input elements under a specified mapping function and
BinaryOperator.
|
static <T |
Collectors.toConcurrentMap(Function
Returns a concurrent
Collector that accumulates elements into a
ConcurrentMap whose keys and values are the result of applying the provided mapping functions to the input elements.
|
static <T |
Collectors.toConcurrentMap(Function
Returns a concurrent
Collector that accumulates elements into a
ConcurrentMap whose keys and values are the result of applying the provided mapping functions to the input elements.
|
static <T |
Collectors.toConcurrentMap(Function
Returns a concurrent
Collector that accumulates elements into a
ConcurrentMap whose keys and values are the result of applying the provided mapping functions to the input elements.
|
static <T |
Collectors.toConcurrentMap(Function
Returns a concurrent
Collector that accumulates elements into a
ConcurrentMap whose keys and values are the result of applying the provided mapping functions to the input elements.
|
static <T |
Collectors.toConcurrentMap(Function
Returns a concurrent
Collector that accumulates elements into a
ConcurrentMap whose keys and values are the result of applying the provided mapping functions to the input elements.
|
static <T |
Collectors.toConcurrentMap(Function
Returns a concurrent
Collector that accumulates elements into a
ConcurrentMap whose keys and values are the result of applying the provided mapping functions to the input elements.
|
static <T |
Collectors.toMap(Function
Returns a
Collector that accumulates elements into a
Map whose keys and values are the result of applying the provided mapping functions to the input elements.
|
static <T |
Collectors.toMap(Function
Returns a
Collector that accumulates elements into a
Map whose keys and values are the result of applying the provided mapping functions to the input elements.
|
static <T |
Collectors.toMap(Function
Returns a
Collector that accumulates elements into a
Map whose keys and values are the result of applying the provided mapping functions to the input elements.
|
static <T |
Collectors.toMap(Function
Returns a
Collector that accumulates elements into a
Map whose keys and values are the result of applying the provided mapping functions to the input elements.
|
static <T |
Collectors.toMap(Function
Returns a
Collector that accumulates elements into a
Map whose keys and values are the result of applying the provided mapping functions to the input elements.
|
static <T |
Collectors.toMap(Function
Returns a
Collector that accumulates elements into a
Map whose keys and values are the result of applying the provided mapping functions to the input elements.
|