in scala
class Option

`sealed abstract class` Option [A]
  `extends` java.lang.Object
  `with` scala.Iterable[A]
  `with` scala.ScalaObject

  This class represents optional values. Instances of `Option` are either instances of case class `Some` or it is case object `None`.

Author:
  Martin Odersky
Author:
  Matthias Zenger
Version:
  1.0, 16/07/2003

Direct Known Subclasses:
  None, Some

Constructor Summary
| `def` this

Def Summary
| `def` elements : scala.Iterator[A]
| `def` filter (p: (A) => scala.Boolean) : scala.Option[A]
| `def` flatMap [B] (f: (A) => scala.Option[B]) : scala.Option[B]
`override` | `def` foreach (f: (A) => scala.Unit) : scala.Unit
| `def` get : A
| `def` get [B >: A] (default: B) : B
| `def` isEmpty : scala.Boolean
| `def` map [B] (f: (A) => B) : scala.Option[B]
`override` | `def` toList : scala.List[A]

Def inherited from scala.Iterable[A]
/: , :\, concat, elements, exists, find, foldLeft, foldRight, forall, foreach, indexOf, sameElements, toList

Constructor Detail

`def` this

Def Detail

`def` elements : scala.Iterator[A]

`def` filter (p: (A) => scala.Boolean): scala.Option[A]

`def` flatMap [B](f: (A) => scala.Option[B]): scala.Option[B]

`override def` foreach (f: (A) => scala.Unit): scala.Unit

`def` get : A

Throws:
  `Predef.NoSuchElementException -`

`def` get [B >: A](default: B): B

`def` isEmpty : scala.Boolean

`def` map [B](f: (A) => B): scala.Option[B]

`override def` toList : scala.List[A]