| Package | Description |
|---|---|
| com.m3.scalaflavor4j |
| Modifier and Type | Class and Description |
|---|---|
class |
None<T>
scala.None
This case object represents non-existent values.
|
class |
Some<T>
scala.Some
Class Some[A] represents existing values of type A.
|
| Modifier and Type | Method and Description |
|---|---|
Option<R> |
CaseClause.apply(Object v) |
static <T> Option<T> |
Option.apply(T value) |
static <T> Option<T> |
Option.empty() |
Option<T> |
Some.filter(Function1<T,Boolean> f) |
abstract Option<T> |
Option.filter(Function1<T,Boolean> f)
Selects all elements of this sequence which satisfy a predicate.
|
Option<T> |
None.filter(Function1<T,Boolean> f) |
abstract Option<T> |
Seq.find(Function1<T,Boolean> p)
Finds the first element of the sequence satisfying a predicate, if any.
|
Option<T> |
Nil.find(Function1<T,Boolean> p) |
Option<T> |
IndexedSeq.find(Function1<T,Boolean> predicate) |
<U> Option<U> |
Some.flatMap(Function1<T,Option<U>> f) |
abstract <U> Option<U> |
Option.flatMap(Function1<T,Option<U>> f)
Returns the result of applying f to this Option's value if this Option is
nonempty.
|
<U> Option<U> |
None.flatMap(Function1<T,Option<U>> f) |
abstract Option<T> |
Seq.headOption()
Optionally selects the first element.
|
Option<T> |
Nil.headOption() |
Option<T> |
IndexedSeq.headOption() |
abstract Option<T> |
Seq.lastOption()
Optionally selects the last element.
|
Option<T> |
Nil.lastOption() |
Option<T> |
IndexedSeq.lastOption() |
Option<L> |
Right.left() |
Option<L> |
Left.left() |
abstract Option<L> |
Either.left()
Projects this Either as a Left.
|
<U> Option<U> |
Some.map(Function1<T,U> f) |
abstract <U> Option<U> |
Option.map(Function1<T,U> f)
Builds a new collection by applying a function to all elements of this
sequence.
|
<U> Option<U> |
None.map(Function1<T,U> f) |
static <T> Option<T> |
Option.none() |
Option<R> |
ExceptionControl.Catch.opt(Function0<R> block)
Apply this catch logic to the supplied body, mapping the result into
Option[T] - None if any exception was caught, Some(T) otherwise.
|
abstract <U> Option<U> |
Seq.reduceLeftOption(Function2<U,T,U> op)
Optionally applies a binary operator to all elements of this immutable
sequence, going left to right.
|
<U> Option<U> |
Nil.reduceLeftOption(Function2<U,T,U> op) |
<U> Option<U> |
IndexedSeq.reduceLeftOption(Function2<U,T,U> operator) |
abstract <U> Option<U> |
Seq.reduceRightOption(Function2<T,U,U> op)
Optionally applies a binary operator to all elements of this immutable
sequence, going right to left.
|
<U> Option<U> |
Nil.reduceRightOption(Function2<T,U,U> op) |
<U> Option<U> |
IndexedSeq.reduceRightOption(Function2<T,U,U> operator) |
Option<R> |
Right.right() |
Option<R> |
Left.right() |
abstract Option<R> |
Either.right()
Projects this Either as a Right.
|
Option<M> |
Extractor.unapply(Object v)
Extract a value
|
static <T1,T2> Option<Tpl2<T1,T2>> |
Tpl2.unapply(Tpl2<T1,T2> tuple) |
static <T1,T2,T3> Option<Tpl3<T1,T2,T3>> |
Tpl3.unapply(Tpl3<T1,T2,T3> tuple) |
static <T1,T2,T3,T4> |
Tpl4.unapply(Tpl4<T1,T2,T3,T4> tuple) |
static <T1,T2,T3,T4,T5> |
Tpl5.unapply(Tpl5<T1,T2,T3,T4,T5> tuple) |
static <T1,T2> Option<Tuple2<T1,T2>> |
Tuple2.unapply(Tuple2<T1,T2> tuple) |
static <T1,T2> Option<Tuple2<T1,T2>> |
Pair.unapply(Tuple2<T1,T2> tuple) |
static <T1,T2,T3> Option<Tuple3<T1,T2,T3>> |
Tuple3.unapply(Tuple3<T1,T2,T3> tuple) |
static <T1,T2,T3> Option<Tuple3<T1,T2,T3>> |
Triple.unapply(Tuple3<T1,T2,T3> tuple) |
static <T1,T2,T3,T4> |
Tuple4.unapply(Tuple4<T1,T2,T3,T4> tuple) |
static <T1,T2,T3,T4,T5> |
Tuple5.unapply(Tuple5<T1,T2,T3,T4,T5> tuple) |
| Modifier and Type | Method and Description |
|---|---|
static <L,R> Either<L,R> |
Left.apply(Option<L> value) |
static <L,R> Either<L,R> |
Right.apply(Option<R> value) |
| Modifier and Type | Method and Description |
|---|---|
<U> Option<U> |
Some.flatMap(Function1<T,Option<U>> f) |
abstract <U> Option<U> |
Option.flatMap(Function1<T,Option<U>> f)
Returns the result of applying f to this Option's value if this Option is
nonempty.
|
<U> Option<U> |
None.flatMap(Function1<T,Option<U>> f) |
| Constructor and Description |
|---|
Left(Option<L> value) |
Right(Option<R> value) |
Copyright © 2015. All rights reserved.