public class JsonNullable<T> extends Object implements Serializable
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
T |
get()
Obtain the value of this
JsonNullable. |
int |
hashCode() |
boolean |
isPresent() |
static <T> JsonNullable<T> |
of(T value)
Create a
JsonNullable from the submitted value. |
T |
orElse(T other)
Obtain the value of this
JsonNullable. |
String |
toString() |
static <T> JsonNullable<T> |
undefined()
Create a
JsonNullable representing an undefined value (not present). |
public static <T> JsonNullable<T> undefined()
JsonNullable representing an undefined value (not present).T - public static <T> JsonNullable<T> of(T value)
JsonNullable from the submitted value.T - the type of the valuevalue - the valueJsonNullable with the submitted value present.public T get()
JsonNullable.NoSuchElementException - if no value is presentpublic T orElse(T other)
JsonNullable.other - the value to be returned if no value is presentJsonNullable if present, the submitted value otherwisepublic boolean isPresent()
Copyright © 2019 FasterXML. All rights reserved.