public class Optional<T> extends Object
Modifier and Type | Method and Description |
---|---|
static <T> Optional<T> |
empty(String errMessage) |
T |
get() |
String |
getErrorMessage() |
boolean |
isPresent() |
static <T> Optional<T> |
of(T value) |