WithFilter

scala.Option.WithFilter
class WithFilter(p: A => Boolean)

We need a whole WithFilter class to honor the "doesn't create a new collection" contract even though it seems unlikely to matter much in a collection with max size 1.

Attributes

Source
Option.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

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

Attributes

Source
Option.scala
def foreach[U](f: A => U): Unit

Attributes

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

Attributes

Source
Option.scala
def withFilter(q: A => Boolean): WithFilter

Attributes

Source
Option.scala