final class Opt[+A] extends AnyVal with Serializable

Like Option but avoids boxing and treats null as no value. Therefore, there is no equivalent for Some(null).

Author: ghik Created: 07/01/16.

Linear Supertypes
Serializable, Serializable, AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Opt
  2. Serializable
  3. Serializable
  4. AnyVal
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def boxed[B](implicit boxing: Boxing[A, B]): Opt[B]
    Annotations
    @inline()
  6. def collect[B](pf: PartialFunction[A, B]): Opt[B]
    Annotations
    @inline()
  7. def contains[A1 >: A](elem: A1): Boolean
    Annotations
    @inline()
  8. def exists(p: (A) ⇒ Boolean): Boolean
    Annotations
    @inline()
  9. def filter(p: (A) ⇒ Boolean): Opt[A]
    Annotations
    @inline()
  10. def filterNot(p: (A) ⇒ Boolean): Opt[A]
    Annotations
    @inline()
  11. def flatMap[B](f: (A) ⇒ Opt[B]): Opt[B]
    Annotations
    @inline()
  12. def flatten[B](implicit ev: <:<[A, Opt[B]]): Opt[B]
    Annotations
    @inline()
  13. def fold[B](ifEmpty: ⇒ B)(f: (A) ⇒ B): B
    Annotations
    @inline()
  14. def forall(p: (A) ⇒ Boolean): Boolean
    Annotations
    @inline()
  15. def foreach[U](f: (A) ⇒ U): Unit
    Annotations
    @inline()
  16. def get: A
    Annotations
    @inline()
  17. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  18. def getOrElse[B >: A](default: ⇒ B): B
    Annotations
    @inline()
  19. def isDefined: Boolean
    Annotations
    @inline()
  20. def isEmpty: Boolean
    Annotations
    @inline()
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. def iterator: Iterator[A]
    Annotations
    @inline()
  23. def map[B](f: (A) ⇒ B): Opt[B]
    Annotations
    @inline()
  24. def nonEmpty: Boolean
    Annotations
    @inline()
  25. def orElse[B >: A](alternative: ⇒ Opt[B]): Opt[B]
    Annotations
    @inline()
  26. def orNull[B >: A](implicit ev: <:<[Null, B]): B
    Annotations
    @inline()
  27. def toLeft[X](right: ⇒ X): Either[A, X]
    Annotations
    @inline()
  28. def toList: List[A]
    Annotations
    @inline()
  29. def toOptRef[B >: Null](implicit boxing: Boxing[A, B]): OptRef[B]
    Annotations
    @inline()
  30. def toOption: Option[A]
    Annotations
    @inline()
  31. def toRight[X](left: ⇒ X): Either[X, A]
    Annotations
    @inline()
  32. def toString(): String
    Definition Classes
    Opt → Any
  33. def unboxed[B](implicit unboxing: Unboxing[B, A]): Opt[B]
    Annotations
    @inline()
  34. def withFilter(p: (A) ⇒ Boolean): WithFilter[A]
    Annotations
    @inline()

Inherited from Serializable

Inherited from Serializable

Inherited from AnyVal

Inherited from Any

Ungrouped