Packages

sealed trait Optional[+A] extends AnyRef

Custom option type to be used for wrapping external data models where most of the fields are defined to be optional.

Instances of Optional are either Optional.Present or Optional.Absent.

The only difference between this type and scala.Option is that there is an implicit conversion defined from A to Optional[A], and from Option[A] to Optional[A].

Self Type
Optional[A]
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Optional
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. class WithFilter extends AnyRef

Abstract Value Members

  1. abstract val isDefined: Boolean
  2. abstract val isEmpty: Boolean
  3. abstract val nonEmpty: Boolean

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def collect[B](pf: PartialFunction[A, B]): Optional[B]
  7. final def contains[A1 >: A](elem: A1): Boolean
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. final def exists(p: (A) => Boolean): Boolean
  11. final def filter(p: (A) => Boolean): Optional[A]
  12. final def filterNot(p: (A) => Boolean): Optional[A]
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  14. final def flatMap[B](f: (A) => Optional[B]): Optional[B]
  15. final def flatten[B](implicit ev: <:<[A, Option[B]]): Option[B]
  16. final def fold[B](ifEmpty: => B)(f: (A) => B): B
  17. final def forall(p: (A) => Boolean): Boolean
  18. final def foreach[U](f: (A) => U): Unit
  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. final def getOrElse[A0 >: A](default: => A0): A0
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. final def iterator: Iterator[A]
  24. final def map[B](f: (A) => B): Optional[B]
  25. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def orElse[B >: A](other: Optional[B]): Optional[B]
  29. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  30. final def toChunk: Chunk[A]
  31. final def toLeft[R](right: R): Either[A, R]
  32. final def toList: List[A]
  33. final def toOption: Option[A]

    Converts this optional value to standard scala.Option

  34. final def toRight[L](left: L): Either[L, A]
  35. def toString(): String
    Definition Classes
    AnyRef → Any
  36. final def toVector: Vector[A]
  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  40. final def withFilter(p: (A) => Boolean): WithFilter

Inherited from AnyRef

Inherited from Any

Ungrouped