final class OptionOps[A] extends AnyVal
- Source
- OptionOps.scala
- Alphabetic
- By Inheritance
- OptionOps
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
- final def <\/[B](b: ⇒ B): \/[A, B]
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
- final def \/>[E](e: ⇒ E): \/[E, A]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- final def cata[X](some: (A) ⇒ X, none: ⇒ X): X
-
final
def
err(message: ⇒ String): A
Returns the item contained in the Option if it is defined, otherwise, raises an error with the provided message.
- final def first: @@[Option[A], First]
- final def foldLift[F[_], B](b: ⇒ B, k: (F[A]) ⇒ B)(implicit arg0: Applicative[F]): B
- final def foldLiftOpt[B](b: ⇒ B, k: (Option[A]) ⇒ B): B
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def getOrElseF[F[_]](fa: ⇒ F[A])(implicit arg0: Applicative[F]): F[A]
-
final
def
ifNone(n: ⇒ Unit): Unit
Executes the provided side effect if the Option if it is undefined.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def last: @@[Option[A], Last]
- final def orEmpty[M[_]](implicit arg0: Applicative[M], arg1: PlusEmpty[M]): M[A]
- final def orZero(implicit z: Monoid[A]): A
- final def toFailure[B](b: ⇒ B): Validation[A, B]
- final def toFailureNel[B](b: ⇒ B): ValidationNel[A, B]
- final def toLeftDisjunction[B](b: ⇒ B): \/[A, B]
- final def toMaybe: Maybe[A]
- final def toRightDisjunction[E](e: ⇒ E): \/[E, A]
-
def
toString(): String
- Definition Classes
- Any
- final def toSuccess[E](e: ⇒ E): Validation[E, A]
- final def toSuccessNel[E](e: ⇒ E): ValidationNel[E, A]
-
final
def
unary_~(implicit z: Monoid[A]): A
Returns the item contained in the Option if it is defined, otherwise, the zero element for the type A
Returns the item contained in the Option if it is defined, otherwise, the zero element for the type A
For example:
val o: Option[List[String]] = None val a: List[String] = ~o // List()
-
final
def
|(a: ⇒ A): A
Returns the item contained in the Option if it is defined, otherwise, the provided argument.