| Modifier and Type | Field and Description |
|---|---|
static Function<Boolean,Option<Boolean>> |
toOption
Function that turns
true into some(true) and false into none. |
| Modifier and Type | Method and Description |
|---|---|
static <A> Function<Option<A>,List<A>> |
asList() |
static <A,B> Function<A,Option<B>> |
foreach(Function<? super A,? extends Option<? extends B>> f,
Effect<? super B> e)
Apply effect
e to the result of f which is then returned. |
static <A> Function<Option<A>,A> |
getF() |
static <A> Function<Option<A>,A> |
getOrElse(A none) |
static <A> Function<Option<A>,Boolean> |
isNone()
Option.isNone() as a function. |
static <A> Function<Option<A>,Boolean> |
isSome()
Option.isSome() as a function. |
static <A> Option<A> |
join(Option<Option<A>> a)
m (m a) -> m a
|
static <A,B,C> Function<A,Option<C>> |
map(Function<? super A,? extends Option<? extends B>> f,
Function<? super B,? extends C> g)
Map
g over the result of f. |
static <A,B> Function<A,Option<B>> |
never() |
static <A> Function0<Option<A>> |
never2() |
static <A> Option<List<A>> |
sequenceOpt(List<Option<A>> as)
Sequence a list of options.
|
static Option<String> |
toOption(boolean predicate,
String message)
Returns some(message) if predicate is false, none otherwise.
|
public static Option<String> toOption(boolean predicate, String message)
public static <A> Option<List<A>> sequenceOpt(List<Option<A>> as)
public static <A,B,C> Function<A,Option<C>> map(Function<? super A,? extends Option<? extends B>> f, Function<? super B,? extends C> g)
g over the result of f.public static <A,B> Function<A,Option<B>> foreach(Function<? super A,? extends Option<? extends B>> f, Effect<? super B> e)
e to the result of f which is then returned.public static <A> Function<Option<A>,Boolean> isNone()
Option.isNone() as a function.public static <A> Function<Option<A>,Boolean> isSome()
Option.isSome() as a function.Copyright © 2009–2021 Opencast Project. All rights reserved.