@EqualityReference public final class Option extends Object
Constructor functions for optional values.
OptionType| Modifier and Type | Method and Description |
|---|---|
static <T> OptionType<T> |
none()
Return
None. |
static <T> OptionType<T> |
of(T x)
|
static <T> OptionType<T> |
some(T x)
Return
Some containing x. |
public static <T> OptionType<T> none()
Return None.
T - The type of valuespublic static <T> OptionType<T> of(@Nullable T x)
T - The type of valuesx - The valuepublic static <T> OptionType<T> some(T x)
Return Some containing x.
T - The type of valuesx - The valueCopyright © 2017 <code@io7m.com> http://io7m.com