Scala Standard Library 2.13.1 - scala.Option (original) (raw)

sealed abstract class Option[+A] extends IterableOnce[A] with Product with Serializable

Ordering

  1. Alphabetic
  2. By Inheritance

Inherited

  1. Option
  2. Serializable
  3. Product
  4. Equals
  5. IterableOnce
  6. AnyRef
  7. Any

Implicitly

  1. by option2Iterable

  2. by iterableOnceExtensionMethods

  3. by any2stringadd

  4. by StringFormat

  5. by Ensuring

  6. by ArrowAssoc

  7. Hide All

  8. Show All

Visibility

  1. Public
  2. Protected

Abstract Value Members

  1. abstract def canEqual(that: Any): Boolean
  2. abstract def get: A
  3. abstract def productArity: Int
  4. abstract def productElement(n: Int): Any

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
  2. final def ##(): Int
  3. def +(other: String): String
  4. final def ++[B >: A](suffix: collection.IterableOnce[B]): collection.Iterable[B]
  5. def ->[B](y: B): (Option[A], B)
  6. final def ==(arg0: Any): Boolean
  7. final def addString(b: collection.mutable.StringBuilder): collection.mutable.StringBuilder
  8. final def addString(b: collection.mutable.StringBuilder, sep: String): collection.mutable.StringBuilder
  9. def addString(b: collection.mutable.StringBuilder, start: String, sep: String, end: String): collection.mutable.StringBuilder
  10. final def asInstanceOf[T0]: T0
  11. def clone(): AnyRef
  12. final def collect[B](pf: PartialFunction[A, B]): Option[B]
  13. def collectFirst[B](pf: PartialFunction[A, B]): Option[B]
  14. def concat[B >: A](suffix: collection.IterableOnce[B]): collection.Iterable[B]
  15. final def contains[A1 >: A](elem: A1): Boolean
  16. def copyToArray[B >: A](xs: Array[B], start: Int, len: Int): Int
  17. def copyToArray[B >: A](xs: Array[B], start: Int): Int
  18. def copyToArray[B >: A](xs: Array[B]): Int
  19. def corresponds[B](that: collection.IterableOnce[B])(p: (A, B) => Boolean): Boolean
  20. def drop(n: Int): collection.Iterable[A]
  21. def dropRight(n: Int): collection.Iterable[A]
  22. def dropWhile(p: (A) => Boolean): collection.Iterable[A]
  23. def empty: collection.Iterable[A]
  24. def ensuring(cond: (Option[A]) => Boolean, msg: => Any): Option[A]
  25. def ensuring(cond: (Option[A]) => Boolean): Option[A]
  26. def ensuring(cond: Boolean, msg: => Any): Option[A]
  27. def ensuring(cond: Boolean): Option[A]
  28. final def eq(arg0: AnyRef): Boolean
  29. def equals(arg0: AnyRef): Boolean
  30. final def exists(p: (A) => Boolean): Boolean
  31. final def filter(p: (A) => Boolean): Option[A]
  32. final def filterNot(p: (A) => Boolean): Option[A]
  33. def finalize(): Unit
  34. final def flatMap[B](f: (A) => Option[B]): Option[B]
  35. def flatten[B](implicit ev: <:<[A, Option[B]]): Option[B]
  36. final def fold[B](ifEmpty: => B)(f: (A) => B): B
  37. def foldLeft[B](z: B)(op: (B, A) => B): B
  38. def foldRight[B](z: B)(op: (A, B) => B): B
  39. final def forall(p: (A) => Boolean): Boolean
  40. final def foreach[U](f: (A) => U): Unit
  41. def formatted(fmtstr: String): String
  42. final def getClass(): Class[_ <: AnyRef]
  43. final def getOrElse[B >: A](default: => B): B
  44. def groupBy[K](f: (A) => K): Map[K, collection.Iterable[A]]
  45. def groupMap[K, B](key: (A) => K)(f: (A) => B): Map[K, collection.Iterable[B]]
  46. def groupMapReduce[K, B](key: (A) => K)(f: (A) => B)(reduce: (B, B) => B): Map[K, B]
  47. def grouped(size: Int): collection.Iterator[collection.Iterable[A]]
  48. def hashCode(): Int
  49. def head: A
  50. def headOption: Option[A]
  51. def init: collection.Iterable[A]
  52. def inits: collection.Iterator[collection.Iterable[A]]
  53. final def isDefined: Boolean
  54. final def isEmpty: Boolean
  55. final def isInstanceOf[T0]: Boolean
  56. def isTraversableAgain: Boolean
  57. def iterableFactory: IterableFactory[collection.Iterable]
  58. def iterator: Iterator[A]
  59. final def knownSize: Int
  60. def last: A
  61. def lastOption: Option[A]
  62. def lazyZip[B]: ([B](that: Iterable[B])scala.collection.LazyZip2[A,B,_1.type]) forSome {val _1: collection.Iterable[A]}
  63. final def map[B](f: (A) => B): Option[B]
  64. def max[B >: A](implicit ord: math.Ordering[B]): A
  65. def maxBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
  66. def maxByOption[B](f: (A) => B)(implicit cmp: math.Ordering[B]): Option[A]
  67. def maxOption[B >: A](implicit ord: math.Ordering[B]): Option[A]
  68. def min[B >: A](implicit ord: math.Ordering[B]): A
  69. def minBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
  70. def minByOption[B](f: (A) => B)(implicit cmp: math.Ordering[B]): Option[A]
  71. def minOption[B >: A](implicit ord: math.Ordering[B]): Option[A]
  72. final def ne(arg0: AnyRef): Boolean
  73. final def nonEmpty: Boolean
  74. final def notify(): Unit
  75. final def notifyAll(): Unit
  76. final def orElse[B >: A](alternative: => Option[B]): Option[B]
  77. final def orNull[A1 >: A](implicit ev: <:<[Null, A1]): A1
  78. def partition(p: (A) => Boolean): (collection.Iterable[A], collection.Iterable[A])
  79. def partitionMap[A1, A2](f: (A) => Either[A1, A2]): (collection.Iterable[A1], collection.Iterable[A2])
  80. def product[B >: A](implicit num: math.Numeric[B]): B
  81. def productElementName(n: Int): String
  82. def productElementNames: Iterator[String]
  83. def productIterator: Iterator[Any]
  84. def productPrefix: String
  85. def reduce[B >: A](op: (B, B) => B): B
  86. def reduceLeft[B >: A](op: (B, A) => B): B
  87. def reduceLeftOption[B >: A](op: (B, A) => B): Option[B]
  88. def reduceOption[B >: A](op: (B, B) => B): Option[B]
  89. def reduceRight[B >: A](op: (A, B) => B): B
  90. def reduceRightOption[B >: A](op: (A, B) => B): Option[B]
  91. def scan[B >: A](z: B)(op: (B, B) => B): collection.Iterable[B]
  92. def scanLeft[B](z: B)(op: (B, A) => B): collection.Iterable[B]
  93. def scanRight[B](z: B)(op: (A, B) => B): collection.Iterable[B]
  94. def sizeCompare(that: collection.Iterable[_]): Int
  95. def sizeCompare(otherSize: Int): Int
  96. final def sizeIs: SizeCompareOps
  97. def slice(from: Int, until: Int): collection.Iterable[A]
  98. def sliding(size: Int, step: Int): collection.Iterator[collection.Iterable[A]]
  99. def sliding(size: Int): collection.Iterator[collection.Iterable[A]]
  100. def span(p: (A) => Boolean): (collection.Iterable[A], collection.Iterable[A])
  101. def splitAt(n: Int): (collection.Iterable[A], collection.Iterable[A])
  102. def stepper[S <: Stepper[_]](implicit shape: StepperShape[A, S]): S
  103. def sum[B >: A](implicit num: math.Numeric[B]): B
  104. final def synchronized[T0](arg0: => T0): T0
  105. def tail: collection.Iterable[A]
  106. def tails: collection.Iterator[collection.Iterable[A]]
  107. def take(n: Int): collection.Iterable[A]
  108. def takeRight(n: Int): collection.Iterable[A]
  109. def takeWhile(p: (A) => Boolean): collection.Iterable[A]
  110. def tapEach[U](f: (A) => U): collection.Iterable[A]
  111. def to[C1](factory: Factory[A, C1]): C1
  112. def toArray[B >: A](implicit arg0: ClassTag[B]): Array[B]
  113. final def toLeft[X](right: => X): Either[A, X]
  114. def toList: List[A]
  115. def toMap[K, V](implicit ev: <:<[A, (K, V)]): Map[K, V]
  116. final def toRight[X](left: => X): Either[X, A]
  117. def toString(): String
  118. def transpose[B](implicit asIterable: (A) => collection.Iterable[B]): collection.Iterable[collection.Iterable[B]]
  119. final def unzip[A1, A2](implicit asPair: <:<[A, (A1, A2)]): (Option[A1], Option[A2])
  120. final def unzip3[A1, A2, A3](implicit asTriple: <:<[A, (A1, A2, A3)]): (Option[A1], Option[A2], Option[A3])
  121. def view: View[A]
  122. final def wait(): Unit
  123. final def wait(arg0: Long, arg1: Int): Unit
  124. final def wait(arg0: Long): Unit
  125. final def withFilter(p: (A) => Boolean): WithFilter
  126. final def zip[A1 >: A, B](that: Option[B]): Option[(A1, B)]
  127. def zipAll[A1 >: A, B](that: collection.Iterable[B], thisElem: A1, thatElem: B): collection.Iterable[(A1, B)]
  128. def zipWithIndex: collection.Iterable[(A, Int)]

Shadowed Implicit Value Members

  1. def collect[B](pf: PartialFunction[A, B]): collection.Iterable[B]
  2. def count(p: (A) => Boolean): Int
  3. def exists(p: (A) => Boolean): Boolean
  4. def filter(pred: (A) => Boolean): collection.Iterable[A]
  5. def filterNot(pred: (A) => Boolean): collection.Iterable[A]
  6. def find(p: (A) => Boolean): Option[A]
  7. def flatMap[B](f: (A) => collection.IterableOnce[B]): collection.Iterable[B]
  8. def flatten[B](implicit asIterable: (A) => collection.IterableOnce[B]): collection.Iterable[B]
  9. def fold[A1 >: A](z: A1)(op: (A1, A1) => A1): A1
  10. def forall(p: (A) => Boolean): Boolean
  11. def foreach[U](f: (A) => U): Unit
  12. def isEmpty: Boolean
  13. def iterator: collection.Iterator[A]
  14. def knownSize: Int
  15. def map[B](f: (A) => B): collection.Iterable[B]
  16. final def mkString: String
  17. final def mkString(sep: String): String
  18. final def mkString(start: String, sep: String, end: String): String
  19. def nonEmpty: Boolean
  20. def size: Int
  21. def stepper[S <: Stepper[_]](implicit shape: StepperShape[A, S]): S
  22. final def toBuffer[B >: A]: Buffer[B]
  23. def toIndexedSeq: collection.immutable.IndexedSeq[A]
  24. final def toIterable: collection.Iterable[A]
  25. def toList: collection.immutable.List[A]
  26. def toSeq: collection.immutable.Seq[A]
  27. def toSet[B >: A]: Set[B]
  28. def toString(): String
  29. def toVector: collection.immutable.Vector[A]
  30. def unzip[A1, A2](implicit asPair: (A) => (A1, A2)): (collection.Iterable[A1], collection.Iterable[A2])
  31. def unzip3[A1, A2, A3](implicit asTriple: (A) => (A1, A2, A3)): (collection.Iterable[A1], collection.Iterable[A2], collection.Iterable[A3])
  32. def withFilter(p: (A) => Boolean): collection.WithFilter[A, collection.Iterable]
  33. def zip[B](that: collection.IterableOnce[B]): collection.Iterable[(A, B)]

Deprecated Value Members

  1. def ++:[B >: A](that: collection.IterableOnce[B]): collection.Iterable[B]
  2. final def /:[B](z: B)(op: (B, A) => B): B
  3. def /:[B](z: B)(op: (B, A) => B): B
  4. final def :\[B](z: B)(op: (A, B) => B): B
  5. def :\[B](z: B)(op: (A, B) => B): B
  6. def aggregate[B](z: => B)(seqop: (B, A) => B, combop: (B, B) => B): B
  7. def collectFirst[B](f: PartialFunction[A, B]): Option[B]
  8. def companion: IterableFactory[collection.Iterable]
  9. final def copyToBuffer[B >: A](dest: Buffer[B]): Unit
  10. def copyToBuffer(dest: Buffer[A]): Unit
  11. def count(f: (A) => Boolean): Int
  12. def exists(f: (A) => Boolean): Boolean
  13. def filter(f: (A) => Boolean): collection.Iterator[A]
  14. def find(p: (A) => Boolean): Option[A]
  15. def flatMap[B](f: (A) => collection.IterableOnce[B]): collection.IterableOnce[B]
  16. def fold[A1 >: A](z: A1)(op: (A1, A1) => A1): A1
  17. def foldLeft[B](z: B)(op: (B, A) => B): B
  18. def foldRight[B](z: B)(op: (A, B) => B): B
  19. def forall(f: (A) => Boolean): Boolean
  20. def foreach[U](f: (A) => U): Unit
  21. def hasDefiniteSize: Boolean
  22. def isEmpty: Boolean
  23. def map[B](f: (A) => B): collection.IterableOnce[B]
  24. def max(implicit ord: math.Ordering[A]): A
  25. def maxBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
  26. def min(implicit ord: math.Ordering[A]): A
  27. def minBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
  28. def mkString: String
  29. def mkString(sep: String): String
  30. def mkString(start: String, sep: String, end: String): String
  31. def nonEmpty: Boolean
  32. def product(implicit num: math.Numeric[A]): A
  33. def reduce(f: (A, A) => A): A
  34. def reduceLeft(f: (A, A) => A): A
  35. def reduceLeftOption(f: (A, A) => A): Option[A]
  36. def reduceOption(f: (A, A) => A): Option[A]
  37. def reduceRight(f: (A, A) => A): A
  38. def reduceRightOption(f: (A, A) => A): Option[A]
  39. final def repr: collection.Iterable[A]
  40. def sameElements[B >: A](that: collection.IterableOnce[B]): Boolean
  41. def seq: collection.Iterable[A]
  42. def size: Int
  43. def sum(implicit num: math.Numeric[A]): A
  44. def to[C1](factory: Factory[A, C1]): C1
  45. def toArray[B >: A](implicit arg0: ClassTag[B]): Array[B]
  46. def toBuffer[B >: A]: Buffer[B]
  47. def toIndexedSeq: collection.IndexedSeq[A]
  48. final def toIterable: collection.Iterable[A]
  49. final def toIterator: collection.Iterator[A]
  50. def toIterator: collection.Iterator[A]
  51. def toList: collection.immutable.List[A]
  52. def toMap[K, V](implicit ev: <:<[A, (K, V)]): Map[K, V]
  53. def toSeq: collection.immutable.Seq[A]
  54. def toSet[B >: A]: Set[B]
  55. final def toStream: collection.immutable.Stream[A]
  56. def toStream: collection.immutable.Stream[A]
  57. final def toTraversable: collection.Traversable[A]
  58. final def toTraversable: collection.Traversable[A]
  59. def toVector: collection.immutable.Vector[A]
  60. def view(from: Int, until: Int): View[A]
  61. def withFilter(f: (A) => Boolean): collection.Iterator[A]
  62. def →[B](y: B): (Option[A], B)

Ungrouped