scalaz

OptionW

trait OptionW [A] extends PimpedType[Option[A]]

Attributes
sealed
Linear Supertypes
PimpedType[Option[A]], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. OptionW
  2. PimpedType
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Type Members

  1. trait Conditional [X] extends AnyRef

    Attributes
    sealed
  2. trait Fold [X] extends AnyRef

    Attributes
    sealed

Abstract Value Members

  1. val value : Option[A]

    Attributes
    abstract
    Definition Classes
    PimpedType

Concrete Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def ? [X] (s: ⇒ X): Conditional[X]

    Ternary operator.

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

    Example option ? "defined" | "undefined"

  7. def asInstanceOf [T0] : T0

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

    Catamorphism over the option.

    Catamorphism over the option. Returns the provided function some applied to item contained in the Option if it is defined, otherwise, the provided value none.

  9. def clone (): AnyRef

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

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

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

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

  13. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  14. def fold [X] (some: (A) ⇒ X, none: ⇒ X): X

    Alias for cata

  15. def foldLift [F[_], B] (b: ⇒ B, k: (F[A]) ⇒ B)(implicit p: Pure[F]): B

    Returns the given value if None, otherwise lifts the Some value and passes it to the given function.

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

    Returns the given value if None, otherwise lifts the Some value to Option and passes it to the given function.

  17. def fst : FirstOption[A]

  18. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  19. def hashCode (): Int

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

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

  21. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  22. def iterDoneOr [B] (b: ⇒ B, f: (A) ⇒ IterV[A, B]): IterV[A, B]

    Returns a Done iteratee with the given value if the Option is not defined, otherwise runs the given function.

  23. def lst : LastOption[A]

  24. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  25. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  26. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  27. def orEmpty [M[_]] (implicit arg0: Pure[M], arg1: Empty[M]): M[A]

    Returns the item contained in the Option wrapped in type M if the Option is defined, otherwise, the empty value for type M.

  28. def orZero (implicit z: Zero[A]): A

  29. def some [X] (s: (A) ⇒ X): Fold[X]

    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 { @link scalaz.OptionW # cata }

    Example: option.some(_ * 2).none(0)

  30. def synchronized [T0] (arg0: ⇒ T0): T0

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

  32. def toString (): String

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

  34. def unary_~ (implicit z: Zero[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 = None
    val a: List[String] = ~o
    

  35. def wait (): Unit

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

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

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

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

Inherited from PimpedType[Option[A]]

Inherited from AnyRef

Inherited from Any