Package akka.util

Class OptionVal<A>


  • public final class OptionVal<A>
    extends scala.AnyVal
    • 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 is OptionVal.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 is OptionVal.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 return default.
        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, or null 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)
      • getClass

        public static java.lang.Class<? extends java.lang.Object> getClass()
      • 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 class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object x$1)
        Overrides:
        equals in class java.lang.Object