Class

scalaz.syntax.std

OptionOps

Related Doc: package std

Permalink

final class OptionOps[A] extends AnyRef

Source
OptionOps.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OptionOps
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new OptionOps(self: Option[A])

    Permalink

Type Members

  1. final class Conditional[X] extends AnyRef

    Permalink
  2. final class Fold[X] extends AnyRef

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def <\/[B](b: ⇒ B): \/[A, B]

    Permalink
  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. final def ?[X](s: ⇒ X): Conditional[X]

    Permalink

    Ternary operator.

    Ternary operator. Note that the arguments s and n are call-by-name.

    Example

    option ? "defined" | "undefined"
  6. final def \/>[E](e: ⇒ E): \/[E, A]

    Permalink
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. final def cata[X](some: (A) ⇒ X, none: ⇒ X): X

    Permalink
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def err(message: ⇒ String): A

    Permalink

    Returns the item contained in the Option if it is defined, otherwise, raises an error with the provided message.

  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def first: @@[Option[A], First]

    Permalink
  15. final def foldLift[F[_], B](b: ⇒ B, k: (F[A]) ⇒ B)(implicit arg0: Applicative[F]): B

    Permalink
  16. final def foldLiftOpt[B](b: ⇒ B, k: (Option[A]) ⇒ B): B

    Permalink
  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def getOrElseF[F[_]](fa: ⇒ F[A])(implicit arg0: Applicative[F]): F[A]

    Permalink
  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def ifNone(n: ⇒ Unit): Unit

    Permalink

    Executes the provided side effect if the Option if it is undefined.

  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. final def last: @@[Option[A], Last]

    Permalink
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def orEmpty[M[_]](implicit arg0: Applicative[M], arg1: PlusEmpty[M]): M[A]

    Permalink
  27. final def orZero(implicit z: Monoid[A]): A

    Permalink
  28. final def some[X](s: (A) ⇒ X): Fold[X]

    Permalink

    Returns the provided function s applied to item contained in the Option if it is defined, otherwise, the provided value n.

    Returns the provided function s applied to item contained in the Option if it is defined, otherwise, the provided value n.

    This is a syntactic alternative to scalaz.syntax.std.OptionOps#cata

    Example:

    o.some(_ * 2).none(0)
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. final def toFailure[B](b: ⇒ B): Validation[A, B]

    Permalink
  31. final def toFailureNel[B](b: ⇒ B): ValidationNel[A, B]

    Permalink
  32. final def toLeftDisjunction[B](b: ⇒ B): \/[A, B]

    Permalink
  33. final def toMaybe: Maybe[A]

    Permalink
  34. final def toRightDisjunction[E](e: ⇒ E): \/[E, A]

    Permalink
  35. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  36. final def toSuccess[E](e: ⇒ E): Validation[E, A]

    Permalink
  37. final def toSuccessNel[E](e: ⇒ E): ValidationNel[E, A]

    Permalink
  38. final def unary_~(implicit z: Monoid[A]): A

    Permalink

    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()
  39. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def |(a: ⇒ A): A

    Permalink

    Returns the item contained in the Option if it is defined, otherwise, the provided argument.

Inherited from AnyRef

Inherited from Any

Ungrouped