Scala Standard Library 2.13.1 - scala.Option (original) (raw)
sealed abstract class Option[+A] extends IterableOnce[A] with Product with Serializable
Ordering
- Alphabetic
- By Inheritance
Inherited
- Option
- Serializable
- Product
- Equals
- IterableOnce
- AnyRef
- Any
Implicitly
by option2Iterable
by iterableOnceExtensionMethods
by any2stringadd
by StringFormat
by Ensuring
by ArrowAssoc
Hide All
Show All
Visibility
- Public
- Protected
Abstract Value Members
- abstract def canEqual(that: Any): Boolean
- abstract def get: A
- abstract def productArity: Int
- abstract def productElement(n: Int): Any
Concrete Value Members
- final def !=(arg0: Any): Boolean
- final def ##(): Int
- def +(other: String): String
- final def ++[B >: A](suffix: collection.IterableOnce[B]): collection.Iterable[B]
- def ->[B](y: B): (Option[A], B)
- final def ==(arg0: Any): Boolean
- final def addString(b: collection.mutable.StringBuilder): collection.mutable.StringBuilder
- final def addString(b: collection.mutable.StringBuilder, sep: String): collection.mutable.StringBuilder
- def addString(b: collection.mutable.StringBuilder, start: String, sep: String, end: String): collection.mutable.StringBuilder
- final def asInstanceOf[T0]: T0
- def clone(): AnyRef
- final def collect[B](pf: PartialFunction[A, B]): Option[B]
- def collectFirst[B](pf: PartialFunction[A, B]): Option[B]
- def concat[B >: A](suffix: collection.IterableOnce[B]): collection.Iterable[B]
- final def contains[A1 >: A](elem: A1): Boolean
- def copyToArray[B >: A](xs: Array[B], start: Int, len: Int): Int
- def copyToArray[B >: A](xs: Array[B], start: Int): Int
- def copyToArray[B >: A](xs: Array[B]): Int
- def corresponds[B](that: collection.IterableOnce[B])(p: (A, B) => Boolean): Boolean
- def drop(n: Int): collection.Iterable[A]
- def dropRight(n: Int): collection.Iterable[A]
- def dropWhile(p: (A) => Boolean): collection.Iterable[A]
- def empty: collection.Iterable[A]
- def ensuring(cond: (Option[A]) => Boolean, msg: => Any): Option[A]
- def ensuring(cond: (Option[A]) => Boolean): Option[A]
- def ensuring(cond: Boolean, msg: => Any): Option[A]
- def ensuring(cond: Boolean): Option[A]
- final def eq(arg0: AnyRef): Boolean
- def equals(arg0: AnyRef): Boolean
- final def exists(p: (A) => Boolean): Boolean
- final def filter(p: (A) => Boolean): Option[A]
- final def filterNot(p: (A) => Boolean): Option[A]
- def finalize(): Unit
- final def flatMap[B](f: (A) => Option[B]): Option[B]
- def flatten[B](implicit ev: <:<[A, Option[B]]): Option[B]
- final def fold[B](ifEmpty: => B)(f: (A) => B): B
- def foldLeft[B](z: B)(op: (B, A) => B): B
- def foldRight[B](z: B)(op: (A, B) => B): B
- final def forall(p: (A) => Boolean): Boolean
- final def foreach[U](f: (A) => U): Unit
- def formatted(fmtstr: String): String
- final def getClass(): Class[_ <: AnyRef]
- final def getOrElse[B >: A](default: => B): B
- def groupBy[K](f: (A) => K): Map[K, collection.Iterable[A]]
- def groupMap[K, B](key: (A) => K)(f: (A) => B): Map[K, collection.Iterable[B]]
- def groupMapReduce[K, B](key: (A) => K)(f: (A) => B)(reduce: (B, B) => B): Map[K, B]
- def grouped(size: Int): collection.Iterator[collection.Iterable[A]]
- def hashCode(): Int
- def head: A
- def headOption: Option[A]
- def init: collection.Iterable[A]
- def inits: collection.Iterator[collection.Iterable[A]]
- final def isDefined: Boolean
- final def isEmpty: Boolean
- final def isInstanceOf[T0]: Boolean
- def isTraversableAgain: Boolean
- def iterableFactory: IterableFactory[collection.Iterable]
- def iterator: Iterator[A]
- final def knownSize: Int
- def last: A
- def lastOption: Option[A]
- def lazyZip[B]: ([B](that: Iterable[B])scala.collection.LazyZip2[A,B,_1.type]) forSome {val _1: collection.Iterable[A]}
- final def map[B](f: (A) => B): Option[B]
- def max[B >: A](implicit ord: math.Ordering[B]): A
- def maxBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
- def maxByOption[B](f: (A) => B)(implicit cmp: math.Ordering[B]): Option[A]
- def maxOption[B >: A](implicit ord: math.Ordering[B]): Option[A]
- def min[B >: A](implicit ord: math.Ordering[B]): A
- def minBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
- def minByOption[B](f: (A) => B)(implicit cmp: math.Ordering[B]): Option[A]
- def minOption[B >: A](implicit ord: math.Ordering[B]): Option[A]
- final def ne(arg0: AnyRef): Boolean
- final def nonEmpty: Boolean
- final def notify(): Unit
- final def notifyAll(): Unit
- final def orElse[B >: A](alternative: => Option[B]): Option[B]
- final def orNull[A1 >: A](implicit ev: <:<[Null, A1]): A1
- def partition(p: (A) => Boolean): (collection.Iterable[A], collection.Iterable[A])
- def partitionMap[A1, A2](f: (A) => Either[A1, A2]): (collection.Iterable[A1], collection.Iterable[A2])
- def product[B >: A](implicit num: math.Numeric[B]): B
- def productElementName(n: Int): String
- def productElementNames: Iterator[String]
- def productIterator: Iterator[Any]
- def productPrefix: String
- def reduce[B >: A](op: (B, B) => B): B
- def reduceLeft[B >: A](op: (B, A) => B): B
- def reduceLeftOption[B >: A](op: (B, A) => B): Option[B]
- def reduceOption[B >: A](op: (B, B) => B): Option[B]
- def reduceRight[B >: A](op: (A, B) => B): B
- def reduceRightOption[B >: A](op: (A, B) => B): Option[B]
- def scan[B >: A](z: B)(op: (B, B) => B): collection.Iterable[B]
- def scanLeft[B](z: B)(op: (B, A) => B): collection.Iterable[B]
- def scanRight[B](z: B)(op: (A, B) => B): collection.Iterable[B]
- def sizeCompare(that: collection.Iterable[_]): Int
- def sizeCompare(otherSize: Int): Int
- final def sizeIs: SizeCompareOps
- def slice(from: Int, until: Int): collection.Iterable[A]
- def sliding(size: Int, step: Int): collection.Iterator[collection.Iterable[A]]
- def sliding(size: Int): collection.Iterator[collection.Iterable[A]]
- def span(p: (A) => Boolean): (collection.Iterable[A], collection.Iterable[A])
- def splitAt(n: Int): (collection.Iterable[A], collection.Iterable[A])
- def stepper[S <: Stepper[_]](implicit shape: StepperShape[A, S]): S
- def sum[B >: A](implicit num: math.Numeric[B]): B
- final def synchronized[T0](arg0: => T0): T0
- def tail: collection.Iterable[A]
- def tails: collection.Iterator[collection.Iterable[A]]
- def take(n: Int): collection.Iterable[A]
- def takeRight(n: Int): collection.Iterable[A]
- def takeWhile(p: (A) => Boolean): collection.Iterable[A]
- def tapEach[U](f: (A) => U): collection.Iterable[A]
- def to[C1](factory: Factory[A, C1]): C1
- def toArray[B >: A](implicit arg0: ClassTag[B]): Array[B]
- final def toLeft[X](right: => X): Either[A, X]
- def toList: List[A]
- def toMap[K, V](implicit ev: <:<[A, (K, V)]): Map[K, V]
- final def toRight[X](left: => X): Either[X, A]
- def toString(): String
- def transpose[B](implicit asIterable: (A) => collection.Iterable[B]): collection.Iterable[collection.Iterable[B]]
- final def unzip[A1, A2](implicit asPair: <:<[A, (A1, A2)]): (Option[A1], Option[A2])
- final def unzip3[A1, A2, A3](implicit asTriple: <:<[A, (A1, A2, A3)]): (Option[A1], Option[A2], Option[A3])
- def view: View[A]
- final def wait(): Unit
- final def wait(arg0: Long, arg1: Int): Unit
- final def wait(arg0: Long): Unit
- final def withFilter(p: (A) => Boolean): WithFilter
- final def zip[A1 >: A, B](that: Option[B]): Option[(A1, B)]
- def zipAll[A1 >: A, B](that: collection.Iterable[B], thisElem: A1, thatElem: B): collection.Iterable[(A1, B)]
- def zipWithIndex: collection.Iterable[(A, Int)]
Shadowed Implicit Value Members
- def collect[B](pf: PartialFunction[A, B]): collection.Iterable[B]
- def count(p: (A) => Boolean): Int
- def exists(p: (A) => Boolean): Boolean
- def filter(pred: (A) => Boolean): collection.Iterable[A]
- def filterNot(pred: (A) => Boolean): collection.Iterable[A]
- def find(p: (A) => Boolean): Option[A]
- def flatMap[B](f: (A) => collection.IterableOnce[B]): collection.Iterable[B]
- def flatten[B](implicit asIterable: (A) => collection.IterableOnce[B]): collection.Iterable[B]
- def fold[A1 >: A](z: A1)(op: (A1, A1) => A1): A1
- def forall(p: (A) => Boolean): Boolean
- def foreach[U](f: (A) => U): Unit
- def isEmpty: Boolean
- def iterator: collection.Iterator[A]
- def knownSize: Int
- def map[B](f: (A) => B): collection.Iterable[B]
- final def mkString: String
- final def mkString(sep: String): String
- final def mkString(start: String, sep: String, end: String): String
- def nonEmpty: Boolean
- def size: Int
- def stepper[S <: Stepper[_]](implicit shape: StepperShape[A, S]): S
- final def toBuffer[B >: A]: Buffer[B]
- def toIndexedSeq: collection.immutable.IndexedSeq[A]
- final def toIterable: collection.Iterable[A]
- def toList: collection.immutable.List[A]
- def toSeq: collection.immutable.Seq[A]
- def toSet[B >: A]: Set[B]
- def toString(): String
- def toVector: collection.immutable.Vector[A]
- def unzip[A1, A2](implicit asPair: (A) => (A1, A2)): (collection.Iterable[A1], collection.Iterable[A2])
- def unzip3[A1, A2, A3](implicit asTriple: (A) => (A1, A2, A3)): (collection.Iterable[A1], collection.Iterable[A2], collection.Iterable[A3])
- def withFilter(p: (A) => Boolean): collection.WithFilter[A, collection.Iterable]
- def zip[B](that: collection.IterableOnce[B]): collection.Iterable[(A, B)]
Deprecated Value Members
- def ++:[B >: A](that: collection.IterableOnce[B]): collection.Iterable[B]
- final def /:[B](z: B)(op: (B, A) => B): B
- def /:[B](z: B)(op: (B, A) => B): B
- final def :\[B](z: B)(op: (A, B) => B): B
- def :\[B](z: B)(op: (A, B) => B): B
- def aggregate[B](z: => B)(seqop: (B, A) => B, combop: (B, B) => B): B
- def collectFirst[B](f: PartialFunction[A, B]): Option[B]
- def companion: IterableFactory[collection.Iterable]
- final def copyToBuffer[B >: A](dest: Buffer[B]): Unit
- def copyToBuffer(dest: Buffer[A]): Unit
- def count(f: (A) => Boolean): Int
- def exists(f: (A) => Boolean): Boolean
- def filter(f: (A) => Boolean): collection.Iterator[A]
- def find(p: (A) => Boolean): Option[A]
- def flatMap[B](f: (A) => collection.IterableOnce[B]): collection.IterableOnce[B]
- def fold[A1 >: A](z: A1)(op: (A1, A1) => A1): A1
- def foldLeft[B](z: B)(op: (B, A) => B): B
- def foldRight[B](z: B)(op: (A, B) => B): B
- def forall(f: (A) => Boolean): Boolean
- def foreach[U](f: (A) => U): Unit
- def hasDefiniteSize: Boolean
- def isEmpty: Boolean
- def map[B](f: (A) => B): collection.IterableOnce[B]
- def max(implicit ord: math.Ordering[A]): A
- def maxBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
- def min(implicit ord: math.Ordering[A]): A
- def minBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
- def mkString: String
- def mkString(sep: String): String
- def mkString(start: String, sep: String, end: String): String
- def nonEmpty: Boolean
- def product(implicit num: math.Numeric[A]): A
- def reduce(f: (A, A) => A): A
- def reduceLeft(f: (A, A) => A): A
- def reduceLeftOption(f: (A, A) => A): Option[A]
- def reduceOption(f: (A, A) => A): Option[A]
- def reduceRight(f: (A, A) => A): A
- def reduceRightOption(f: (A, A) => A): Option[A]
- final def repr: collection.Iterable[A]
- def sameElements[B >: A](that: collection.IterableOnce[B]): Boolean
- def seq: collection.Iterable[A]
- def size: Int
- def sum(implicit num: math.Numeric[A]): A
- def to[C1](factory: Factory[A, C1]): C1
- def toArray[B >: A](implicit arg0: ClassTag[B]): Array[B]
- def toBuffer[B >: A]: Buffer[B]
- def toIndexedSeq: collection.IndexedSeq[A]
- final def toIterable: collection.Iterable[A]
- final def toIterator: collection.Iterator[A]
- def toIterator: collection.Iterator[A]
- def toList: collection.immutable.List[A]
- def toMap[K, V](implicit ev: <:<[A, (K, V)]): Map[K, V]
- def toSeq: collection.immutable.Seq[A]
- def toSet[B >: A]: Set[B]
- final def toStream: collection.immutable.Stream[A]
- def toStream: collection.immutable.Stream[A]
- final def toTraversable: collection.Traversable[A]
- final def toTraversable: collection.Traversable[A]
- def toVector: collection.immutable.Vector[A]
- def view(from: Int, until: Int): View[A]
- def withFilter(f: (A) => Boolean): collection.Iterator[A]
- def →[B](y: B): (Option[A], B)