|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object akka.japi.Option<A>
public abstract class Option<A>
This class represents optional values. Instances of Option
are either instances of case class Some
or it is case
object None
.
Nested Class Summary | |
---|---|
static class |
Option.Some<A>
Class Some[A] represents existing values of type
A . |
static class |
Option.Some$
|
Constructor Summary | |
---|---|
Option()
|
Method Summary | ||
---|---|---|
abstract scala.Option<A> |
asScala()
|
|
static
|
fromScalaOption(scala.Option<T> scalaOption)
Converts a Scala Option to a Java Option |
|
abstract A |
get()
|
|
abstract
|
getOrElse(B defaultValue)
Returns a if this is some(a) or defaultValue if
this is none . |
|
boolean |
isDefined()
|
|
abstract boolean |
isEmpty()
|
|
java.util.Iterator<A> |
iterator()
|
|
static
|
java2ScalaOption(Option<A> o)
|
|
static
|
none()
Option factory that creates None |
|
static
|
option(A v)
Option factory that creates None if
v is null , Some(v) otherwise. |
|
static
|
scala2JavaOption(scala.Option<A> o)
|
|
static
|
some(A v)
Option factory that creates Some |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Option()
Method Detail |
---|
public static <A> Option<A> some(A v)
Option
factory that creates Some
v
- (undocumented)
public static <A> Option<A> none()
Option
factory that creates None
public static <A> Option<A> option(A v)
Option
factory that creates None
if
v
is null
, Some(v)
otherwise.
v
- (undocumented)
public static <T> Option<T> fromScalaOption(scala.Option<T> scalaOption)
scalaOption
- (undocumented)
public static <A> scala.Option<A> java2ScalaOption(Option<A> o)
public static <A> Option<A> scala2JavaOption(scala.Option<A> o)
public abstract A get()
public abstract <B> B getOrElse(B defaultValue)
a
if this is some(a)
or defaultValue
if
this is none
.
defaultValue
- (undocumented)
public abstract boolean isEmpty()
public boolean isDefined()
public abstract scala.Option<A> asScala()
public java.util.Iterator<A> iterator()
iterator
in interface java.lang.Iterable<A>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |