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 classOptionVal.Some$
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <A> OptionVal<A>apply(A x)<B> booleancontains(B it)static <B,A>
booleancontains$extension(OptionVal<A> $this, B it)booleanequals(java.lang.Object x$1)static <A> booleanequals$extension(OptionVal<A> $this, java.lang.Object x$1)Aget()static <A> Aget$extension(OptionVal<A> $this)Returns the option's value.<B> BgetOrElse(B default_)static <B,A>
BgetOrElse$extension(OptionVal<A> $this, B default_)Returns the option's value if the option is nonempty, otherwise returndefault.inthashCode()static <A> inthashCode$extension(OptionVal<A> $this)booleanisDefined()static <A> booleanisDefined$extension(OptionVal<A> $this)Returns true if the option isOptionVal.None, false otherwise.booleanisEmpty()static <A> booleanisEmpty$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,nullvalues.<A1> A1orNull(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, ornullif it is empty.java.lang.StringtoString()static <A> java.lang.StringtoString$extension(OptionVal<A> $this)Ax()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,nullvalues.- 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, ornullif 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:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object x$1)
- Overrides:
equalsin classjava.lang.Object
-
-