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
- Alphabetic
- By Inheritance
Inherited
- Optional
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
- class WithFilter extends AnyRef
Abstract Value Members
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def collect[B](pf: PartialFunction[A, B]): Optional[B]
- final def contains[A1 >: A](elem: A1): Boolean
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def exists(p: (A) => Boolean): Boolean
- final def filter(p: (A) => Boolean): Optional[A]
- final def filterNot(p: (A) => Boolean): Optional[A]
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def flatMap[B](f: (A) => Optional[B]): Optional[B]
- final def flatten[B](implicit ev: <:<[A, Option[B]]): Option[B]
- final def fold[B](ifEmpty: => B)(f: (A) => B): B
- final def forall(p: (A) => Boolean): Boolean
- final def foreach[U](f: (A) => U): Unit
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def getOrElse[A0 >: A](default: => A0): A0
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def iterator: Iterator[A]
- final def map[B](f: (A) => B): Optional[B]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def orElse[B >: A](other: Optional[B]): Optional[B]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def toChunk: Chunk[A]
- final def toLeft[R](right: R): Either[A, R]
- final def toList: List[A]
- final def toOption: Option[A]
Converts this optional value to standard scala.Option
- final def toRight[L](left: L): Either[L, A]
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def toVector: Vector[A]
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def withFilter(p: (A) => Boolean): WithFilter