Package akka.util
Class OptionVal<A>
- java.lang.Object
-
- scala.AnyVal
-
- akka.util.OptionVal<A>
-
public final class OptionVal<A> extends scala.AnyVal
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OptionVal.Some$
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <A> OptionVal<A>
apply(A x)
<B> boolean
contains(B it)
static <B,A>
booleancontains$extension(OptionVal<A> $this, B it)
boolean
equals(java.lang.Object x$1)
static <A> boolean
equals$extension(OptionVal<A> $this, java.lang.Object x$1)
A
get()
static <A> A
get$extension(OptionVal<A> $this)
Returns the option's value.<B> B
getOrElse(B default_)
static <B,A>
BgetOrElse$extension(OptionVal<A> $this, B default_)
Returns the option's value if the option is nonempty, otherwise returndefault
.int
hashCode()
static <A> int
hashCode$extension(OptionVal<A> $this)
boolean
isDefined()
static <A> boolean
isDefined$extension(OptionVal<A> $this)
Returns true if the option isOptionVal.None
, false otherwise.boolean
isEmpty()
static <A> boolean
isEmpty$extension(OptionVal<A> $this)
Returns true if the option isOptionVal.None
, false otherwise.static <A> OptionVal<A>
none()
static OptionVal<scala.runtime.Null$>
None()
Represents non-existent values,null
values.<A1> A1
orNull(scala.Predef.$less$colon$less<scala.runtime.Null$,A1> ev)
static <A1,A>
A1orNull$extension(OptionVal<A> $this, scala.Predef.$less$colon$less<scala.runtime.Null$,A1> ev)
Returns the option's value if it is nonempty, ornull
if it is empty.java.lang.String
toString()
static <A> java.lang.String
toString$extension(OptionVal<A> $this)
A
x()
Returns the option's value.
-
-
-
Constructor Detail
-
OptionVal
public OptionVal(A x)
-
-
Method Detail
-
apply
public static <A> OptionVal<A> apply(A x)
-
none
public static <A> OptionVal<A> none()
-
None
public static OptionVal<scala.runtime.Null$> None()
Represents non-existent values,null
values.- Returns:
- (undocumented)
-
isEmpty$extension
public static final <A> boolean isEmpty$extension(OptionVal<A> $this)
Returns true if the option isOptionVal.None
, false otherwise.- Parameters:
$this
- (undocumented)- Returns:
- (undocumented)
-
isDefined$extension
public static final <A> boolean isDefined$extension(OptionVal<A> $this)
Returns true if the option isOptionVal.None
, false otherwise.- Parameters:
$this
- (undocumented)- Returns:
- (undocumented)
-
getOrElse$extension
public static final <B,A> B getOrElse$extension(OptionVal<A> $this, B default_)
Returns the option's value if the option is nonempty, otherwise returndefault
.- Parameters:
$this
- (undocumented)default_
- (undocumented)- Returns:
- (undocumented)
-
contains$extension
public static final <B,A> boolean contains$extension(OptionVal<A> $this, B it)
-
orNull$extension
public static final <A1,A> A1 orNull$extension(OptionVal<A> $this, scala.Predef.$less$colon$less<scala.runtime.Null$,A1> ev)
Returns the option's value if it is nonempty, ornull
if it is empty.- Parameters:
$this
- (undocumented)ev
- (undocumented)- Returns:
- (undocumented)
-
get$extension
public static final <A> A get$extension(OptionVal<A> $this)
Returns the option's value.- Parameters:
$this
- (undocumented)- Returns:
- (undocumented)
- Throws:
java.util.NoSuchElementException
- if the option is empty.
-
toString$extension
public static final <A> java.lang.String toString$extension(OptionVal<A> $this)
-
hashCode$extension
public static final <A> int hashCode$extension(OptionVal<A> $this)
-
equals$extension
public static final <A> boolean equals$extension(OptionVal<A> $this, java.lang.Object x$1)
-
x
public A x()
Returns the option's value.- Returns:
- (undocumented)
- Throws:
java.util.NoSuchElementException
- if the option is empty.
-
isEmpty
public boolean isEmpty()
-
isDefined
public boolean isDefined()
-
getOrElse
public <B> B getOrElse(B default_)
-
contains
public <B> boolean contains(B it)
-
orNull
public <A1> A1 orNull(scala.Predef.$less$colon$less<scala.runtime.Null$,A1> ev)
-
get
public A get()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object x$1)
- Overrides:
equals
in classjava.lang.Object
-
-