Package org.apache.flink.types
Class SerializableOptional<T extends Serializable>
- java.lang.Object
-
- org.apache.flink.types.SerializableOptional<T>
-
- All Implemented Interfaces:
Serializable
public final class SerializableOptional<T extends Serializable> extends Object implements Serializable
SerializableOptional
.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T extends Serializable>
SerializableOptional<T>empty()
T
get()
void
ifPresent(Consumer<? super T> consumer)
boolean
isPresent()
<R extends Serializable>
SerializableOptional<R>map(Function<? super T,? extends R> mapper)
static <T extends Serializable>
SerializableOptional<T>of(T value)
static <T extends Serializable>
SerializableOptional<T>ofNullable(T value)
Optional<T>
toOptional()
-
-
-
Method Detail
-
get
public T get()
-
isPresent
public boolean isPresent()
-
map
public <R extends Serializable> SerializableOptional<R> map(Function<? super T,? extends R> mapper)
-
of
public static <T extends Serializable> SerializableOptional<T> of(@Nonnull T value)
-
ofNullable
public static <T extends Serializable> SerializableOptional<T> ofNullable(@Nullable T value)
-
empty
public static <T extends Serializable> SerializableOptional<T> empty()
-
-