Package | Description |
---|---|
java.util | |
java.util.stream |
Modifier and Type | Method and Description |
---|---|
static <T> Optional<T> |
Optional.empty() |
Optional<T> |
Optional.filter(Predicate<? super T> predicate) |
<U> Optional<U> |
Optional.flatMap(Function<? super T,Optional<U>> mapper) |
<U> Optional<U> |
Optional.map(Function<? super T,? extends U> mapper) |
static <T> Optional<T> |
Optional.of(T value) |
static <T> Optional<T> |
Optional.ofNullable(T value) |
Modifier and Type | Method and Description |
---|---|
<U> Optional<U> |
Optional.flatMap(Function<? super T,Optional<U>> mapper) |
Modifier and Type | Method and Description |
---|---|
Optional<T> |
Stream.findAny() |
Optional<T> |
Stream.findFirst() |
Optional<T> |
Stream.max(Comparator<? super T> comparator) |
Optional<T> |
Stream.min(Comparator<? super T> comparator) |
Optional<T> |
Stream.reduce(BinaryOperator<T> accumulator) |
Modifier and Type | Method and Description |
---|---|
static <T> Collector<T,?,Optional<T>> |
Collectors.maxBy(Comparator<? super T> comparator) |
static <T> Collector<T,?,Optional<T>> |
Collectors.minBy(Comparator<? super T> comparator) |
static <T> Collector<T,?,Optional<T>> |
Collectors.reducing(BinaryOperator<T> op) |
Copyright © 2018. All rights reserved.