|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectplay.libs.F.Option<T>
public abstract static class F.Option<T>
Represents optional values. Instances of Option are either an instance of Some or the object None.
| Constructor Summary | |
|---|---|
F.Option()
|
|
| Method Summary | ||
|---|---|---|
abstract T |
get()
Returns the value if defined. |
|
T |
getOrElse(T defaultValue)
|
|
abstract boolean |
isDefined()
Returns true if this value is defined. |
|
|
map(F.Function<T,A> f)
|
|
static
|
None()
Constructs a None value. |
|
static
|
Some(T value)
Construct a Some value. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Constructor Detail |
|---|
public F.Option()
| Method Detail |
|---|
public abstract boolean isDefined()
true if this value is defined.
public abstract T get()
public static <T> F.None<T> None()
None value.
public static <T> F.Some<T> Some(T value)
Some value.
public T getOrElse(T defaultValue)
public <A> F.Option<A> map(F.Function<T,A> f)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||