com.paypal.cascade.common

option

package option

Convenience methods and implicit wrappers for working with scala.Option

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. option
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. implicit class Any2Option[T] extends AnyRef

    Allows any object to be wrapped in a Some or an Option.

    Allows any object to be wrapped in a Some or an Option. Note that some objects provide their own toOption or similar methods; provided methods should be preferred over these implicits, in these cases.

    import com.paypal.cascade.common.option._
    val a = 5.some // Option[Int], equal to Some(5)
    T

    the wrapped object's type, and the type of the resulting Option

  2. implicit class RichOption[T] extends AnyRef

    Extends an Option for side effects based on the optional value.

    Extends an Option for side effects based on the optional value.

    T

    the type of the optional value

  3. implicit class RichOptionBoolean extends AnyRef

    Convenience methods for working with Option[Boolean] types

  4. implicit class RichOptionTuple[T, U] extends AnyRef

    Convenience methods for working with pairs of Options.

    Convenience methods for working with pairs of Options.

    import com.paypal.cascade.common.option._
    val a = (Some("hi"), None)
    a.fold( ... )

Value Members

  1. def none[T]: Option[T]

    A convenience method borrowed from Scalaz.

    A convenience method borrowed from Scalaz. Produces an explicitly typed None.

    T

    the Option type

    returns

    a None of type Option[T]

Inherited from AnyRef

Inherited from Any

Ungrouped