public class Optional<T>
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static <T> Optional<T> |
empty() |
T |
get() |
boolean |
isPresent() |
static <T> Optional<T> |
of(T value) |
static <T> Optional<T> |
ofNullable(T value) |
T |
orElse(T other) |
T |
orElseGet(Supplier<T> other) |