scalaz.syntax.std

OptionOps

trait OptionOps[A] extends Ops[Option[A]]

Source
OptionOps.scala
Linear Supertypes
Ops[Option[A]], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. OptionOps
  2. Ops
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait Conditional[X] extends AnyRef

  2. sealed trait Fold[X] extends AnyRef

Abstract Value Members

  1. abstract def self: Option[A]

    Definition Classes
    Ops

Concrete Value Members

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

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

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

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

  5. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  7. final 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"
  8. final def \/>[E](e: ⇒ E): \/[E, A]

  9. final def asInstanceOf[T0]: T0

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

  11. def clone(): AnyRef

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

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

    Definition Classes
    AnyRef → Any
  14. 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.

  15. def finalize(): Unit

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

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

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

  19. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

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

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

  22. final def isInstanceOf[T0]: Boolean

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

  24. final def ne(arg0: AnyRef): Boolean

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

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

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

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

  29. final 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 scalaz.syntax.std.OptionOps#cata

    Example:

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

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

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

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

  34. def toString(): String

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

  36. 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 = None
    val a: List[String] = ~o
  37. final def wait(): Unit

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

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

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

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

Deprecated Value Members

  1. final def fold[X](some: (A) ⇒ X, none: ⇒ X): X

    Annotations
    @deprecated
    Deprecated

    (Since version 7.1.0) use option.cata or option.some(f).none(default)

Inherited from Ops[Option[A]]

Inherited from AnyRef

Inherited from Any

Ungrouped