| Package | Description |
|---|---|
| java.util | |
| java.util.function |
| Modifier and Type | Method and Description |
|---|---|
static <T,U extends Comparable<? super U>> |
Comparator.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. |
static <T,U> Comparator<T> |
Comparator.comparing(Function<? super T,? extends U> keyExtractor,
Comparator<? super U> keyComparator)
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<? 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)
Returns a lexicographic-order comparator with a function that
extracts a
Comparable sort key. |
default <U> Comparator<T> |
Comparator.thenComparing(Function<? super T,? extends U> keyExtractor,
Comparator<? super U> keyComparator)
Returns a lexicographic-order comparator with a function that
extracts a key to be compared with the given
Comparator. |
| 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<T,V> |
Function.andThen(Function<? super R,? extends V> after)
Returns a composed function that first applies this function to
its input, and then applies the
after function to the result. |
default <V> Function<V,R> |
Function.compose(Function<? super V,? extends T> before)
Returns a composed function that first applies the
before
function to its input, and then applies this function to the result. |
static <T> Function<T,T> |
Function.identity()
Returns a function that always returns its input argument.
|
| Modifier and Type | Method and Description |
|---|---|
default <V> Function<T,V> |
Function.andThen(Function<? super R,? extends V> after)
Returns a composed function that first applies this function to
its input, and then applies the
after function to the result. |
default <V> BiFunction<T,U,V> |
BiFunction.andThen(Function<? super R,? extends V> after)
Returns a composed function that first applies this function to
its input, and then applies the
after function to the result. |
default <V> Function<V,R> |
Function.compose(Function<? super V,? extends T> before)
Returns a composed function that first applies the
before
function to its input, and then applies this function to the result. |
Copyright © 2025 API Design. All Rights Reserved.