public static class Option.Some<T> extends Object implements Option<T>
Option.Some<T>
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
Deprecated.
|
T |
get()
Return the value wrapped in this Option.
|
T |
getOrElse(T t)
If this is Some, return the value wrapped in this Option.
|
int |
hashCode()
Deprecated.
|
boolean |
isSome()
Is this Some?
|
<U> U |
match(Fn1<T,U> has,
Fn0<U> hasNot)
Pass in a function to execute if its Some and another to execute if its None.
|
<U> Option<U> |
then(Fn1<T,Option<U>> f)
If this is Some, Apply the given function, else return None.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
none, of, some, someOrNullNoneOf
public T get()
public T getOrElse(T t)
public <U> U match(Fn1<T,U> has, Fn0<U> hasNot)
public <U> Option<U> then(Fn1<T,Option<U>> f)
@Deprecated public int hashCode()
@Deprecated public boolean equals(Object other)
Copyright © 2017. All rights reserved.