Package com.yahoo.lang
Class SettableOptional<T>
- java.lang.Object
-
- com.yahoo.lang.SettableOptional<T>
-
public final class SettableOptional<T> extends java.lang.Object
An optional which contains a settable value- Author:
- bratseth
-
-
Constructor Summary
Constructors Constructor Description SettableOptional()
Creates a new empty settable optionalSettableOptional(java.util.Optional<T> value)
Creates a new settable optional with the given value, or an emptySettableOptional(T value)
Creates a new settable optional with the given value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<T>
asOptional()
T
get()
boolean
isPresent()
void
set(java.util.Optional<T> value)
void
set(T value)
-
-
-
Constructor Detail
-
SettableOptional
public SettableOptional()
Creates a new empty settable optional
-
SettableOptional
public SettableOptional(T value)
Creates a new settable optional with the given value
-
SettableOptional
public SettableOptional(java.util.Optional<T> value)
Creates a new settable optional with the given value, or an empty
-
-