scala.collection.immutable.Stream

Empty

object Empty extends Stream[Nothing]

Inherits

  1. Stream
  2. LinearSeq
  3. LinearSeq
  4. LinearSeqLike
  5. Seq
  6. Seq
  7. SeqLike
  8. PartialFunction
  9. Function1
  10. Iterable
  11. Iterable
  12. IterableLike
  13. Equals
  14. Traversable
  15. Immutable
  16. Traversable
  17. GenericTraversableTemplate
  18. TraversableLike
  19. HasNewBuilder
  20. AnyRef
  21. Any

Type Members

  1. class WithFilter extends AnyRef

    A class supporting filtered operations

Value Members

  1. def ++[B >: A, That](that: Iterator[B])(bf: CanBuildFrom[Stream[A], B, That]): That

    Create a new stream which contains all elements of this stream followed by all elements of Iterator that'

  2. def ++[B >: A, That](that: Traversable[B])(bf: CanBuildFrom[Stream[A], B, That]): That

    Create a new stream which contains all elements of this stream followed by all elements of Traversable that'

  3. def +:[B >: A, That](elem: B)(bf: CanBuildFrom[Repr, B, That]): That

    Prepends an element to this sequence

  4. def /:[B](z: B)(op: (B, A) ⇒ B): B

    Applies a binary operator to a start value and all elements of this sequence, going left to right

  5. def :+[B >: A, That](elem: B)(bf: CanBuildFrom[Repr, B, That]): That

    Appends an element to this sequence

  6. def :\[B](z: B)(op: (A, B) ⇒ B): B

    Applies a binary operator to all elements of this sequence and a start value, going right to left

  7. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder

    Write all defined elements of this iterable into given string builder

  8. def addString(b: StringBuilder): StringBuilder

    Appends all elements of this sequence to a string builder

  9. def addString(b: StringBuilder, sep: String): StringBuilder

    Appends all elements of this sequence to a string builder using a separator string

  10. def andThen[C](k: (B) ⇒ C): PartialFunction[A, C]

    Composes this partial function with a transformation function that gets applied to results of this partial function

  11. def append[B >: A](rest: ⇒ Traversable[B]): Stream[B]

    The stream resulting from the concatenation of this stream with the argument stream

  12. def apply(n: Int): A

    Selects an element by its index in the sequence

  13. def canEqual(that: Any): Boolean

    Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind

  14. def companion: GenericCompanion[Stream[A][A]]

    The factory companion object that builds instances of class LinearSeq

  15. def compose[A](g: (A) ⇒ T1): (A) ⇒ R

    (f compose g)(x) == f(g(x))

  16. def contains(elem: Any): Boolean

    Tests whether this sequence contains a given value as an element

  17. def containsSlice[B](that: Seq[B]): Boolean

    Tests whether this sequence contains a given sequence as a slice

  18. def copyToArray[B >: A](xs: Array[B], start: Int, len: Int): Unit

    Copies elements of this sequence to an array

  19. def copyToArray[B >: A](xs: Array[B]): Unit

    Copies elements of this sequence to an array

  20. def copyToArray[B >: A](xs: Array[B], start: Int): Unit

    Copies elements of this sequence to an array

  21. def copyToBuffer[B >: A](dest: Buffer[B]): Unit

    Copies all elements of this sequence to a buffer

  22. def corresponds[B](that: Seq[B])(p: (A, B) ⇒ Boolean): Boolean

    Tests whether every element of this sequence relates to the corresponding element of another sequence by satisfying a test predicate

  23. def count(p: (A) ⇒ Boolean): Int

    Counts the number of elements in the sequence which satisfy a predicate

  24. def diff[B >: A, That](that: Seq[B]): Repr

    Computes the multiset difference between this sequence and another sequence

  25. def drop(n: Int): Repr

    Selects all elements except first n ones

  26. def dropRight(n: Int): Repr

    Selects all elements except first n ones

  27. def dropWhile(p: (A) ⇒ Boolean): Stream[A]

    Returns the longest suffix of this iterable whose first element does not satisfy the predicate p

  28. def elements: Iterator[A]

  29. def endsWith[B](that: Seq[B]): Boolean

    Tests whether this sequence ends with the given sequence

  30. def equals(that: Any): Boolean

    The equality method defined in AnyRef

  31. def equalsWith[B](that: Seq[B])(f: (A, B) ⇒ Boolean): Boolean

    Tests whether every element of this sequence relates to the corresponding element of another sequence by satisfying a test predicate

  32. def exists(p: (A) ⇒ Boolean): Boolean

    Tests whether a predicate holds for some of the elements of this sequence

  33. def filterNot(p: (A) ⇒ Boolean): Repr

    Selects all elements of this sequence which do not satisfy a predicate

  34. def find(p: (A) ⇒ Boolean): Option[A]

    Finds the first element of the sequence satisfying a predicate, if any

  35. def findIndexOf(p: (A) ⇒ Boolean): Int

    Returns index of the first element satisying a predicate, or -1

  36. def findLastIndexOf(p: (A) ⇒ Boolean): Int

    Returns index of the last element satisying a predicate, or -1

  37. def first: A

  38. def firstOption: Option[A]

    None if iterable is empty

  39. def flatten[B](asTraversable: (A) ⇒ Traversable[B]): Stream[B]

    Converts this sequence of traversable collections into a sequence in which all element collections are concatenated

  40. def foldRight[B](z: B)(f: (A, B) ⇒ B): B

    Applies a binary operator to all elements of this sequence and a start value, going right to left

  41. def forall(p: (A) ⇒ Boolean): Boolean

    Tests whether a predicate holds for all elements of this sequence

  42. def force: Stream[A]

    Force evaluation of the whole stream and return it

  43. def genericBuilder[B]: Builder[B, CC[B]]

    The generic builder that builds instances of LinearSeq at arbitrary element types

  44. def groupBy[K](f: (A) ⇒ K): Map[K, Repr]

    Partitions this sequence into a map of sequences according to some discriminator function

  45. def hasDefiniteSize: Boolean

    Tests whether this sequence is known to have a finite size

  46. def hashCode(): Int

    Hashcodes for LinearSeq produce a value from the hashcodes of all the elements of the sequence

  47. def head: Nothing

    The first element of this stream

  48. def headOption: Option[A]

    Optionally selects the first element

  49. def indexOf[B >: A](elem: B, from: Int): Int

    Finds index of first occurrence of some value in this sequence after or at some start index

  50. def indexOf[B >: A](elem: B): Int

    Finds index of first occurrence of some value in this sequence

  51. def indexOfSlice[B >: A](that: Seq[B], from: Int): Int

    Finds first index after or at a start index where this sequence contains a given sequence as a slice

  52. def indexOfSlice[B >: A](that: Seq[B]): Int

    Finds first index where this sequence contains a given sequence as a slice

  53. def indexWhere(p: (A) ⇒ Boolean, from: Int): Int

    Finds index of the first element satisfying some predicate after or at some start index

  54. def indexWhere(p: (A) ⇒ Boolean): Int

    Finds index of first element satisfying some predicate

  55. def indices: Range

    Produces the range of all indices of this sequence

  56. def init: Stream[A]

    The stream without its last element

  57. def intersect[B >: A, That](that: Seq[B]): Repr

    Computes the multiset intersection between this sequence and another sequence

  58. def isDefinedAt(x: Int): Boolean

    Tests whether this sequence contains given index

  59. def isEmpty: Boolean

    is this stream empty? @return true if the sequence contain no elements, false otherwise

  60. def iterator: Iterator[A]

    Creates a new iterator over all elements contained in this iterable object

  61. def last: A

    Selects the last element

  62. def lastIndexOf[B >: A](elem: B, end: Int): Int

    Finds index of last occurrence of some value in this sequence before or at a given end index

  63. def lastIndexOf[B >: A](elem: B): Int

    Finds index of last occurrence of some value in this sequence

  64. def lastIndexOfSlice[B >: A](that: Seq[B], end: Int): Int

    Finds last index before or at a given end index where this sequence contains a given sequence as a slice

  65. def lastIndexOfSlice[B >: A](that: Seq[B]): Int

    Finds last index where this sequence contains a given sequence as a slice

  66. def lastIndexWhere(p: (A) ⇒ Boolean, end: Int): Int

    Finds index of last element satisfying some predicate before or at given end index

  67. def lastIndexWhere(p: (A) ⇒ Boolean): Int

    Finds index of last element satisfying some predicate

  68. def lastOption: Option[A]

    Optionally selects the last element

  69. def length: Int

    The length of the sequence

  70. def lengthCompare(len: Int): Int

    Compares the length of this sequence to a test value

  71. def lift: (A) ⇒ Option[B]

    Turns this partial function into an plain function returning an Option result

  72. def max[B >: A](cmp: Ordering[B]): A

    Finds the largest element

  73. def min[B >: A](cmp: Ordering[B]): A

    Finds the smallest element

  74. def mkString: String

    Displays all elements of this sequence in a string

  75. def mkString(sep: String): String

    Displays all elements of this sequence in a string using a separator string

  76. def mkString(start: String, sep: String, end: String): String

    Displays all elements of this sequence in a string using start, end, and separator strings

  77. def nonEmpty: Boolean

    Tests whether the sequence is not empty

  78. def orElse[A1 <: A, B1 >: B](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]

    Composes this partial function with a fallback partial function which gets applied where this partial function is not defined

  79. def padTo[B >: A, That](len: Int, elem: B)(bf: CanBuildFrom[Stream[A], B, That]): That

    Returns a new sequence of given length containing the elements of this sequence followed by zero or more occurrences of given elements

  80. def partialMap[B, That](pf: PartialFunction[A, B])(bf: CanBuildFrom[Repr, B, That]): That

    Builds a new collection by applying a partial function to all elements of this sequence on which the function is defined

  81. def partition(p: (A) ⇒ Boolean): (Stream[A], Stream[A])

    Returns all the elements of this stream that satisfy the predicate p

  82. def patch[B >: A, That](from: Int, patch: Seq[B], replaced: Int)(bf: CanBuildFrom[Repr, B, That]): That

    Produces a new sequence where a slice of elements in this sequence is replaced by another sequence

  83. def prefixLength(p: (A) ⇒ Boolean): Int

    Returns the length of the longest prefix whose elements all satisfy some preficate

  84. def print(sep: String): Unit

    Prints elements of this stream one by one, separated by sep

  85. def print(): Unit

    Prints elements of this stream one by one, separated by commas

  86. def product[B >: A](num: Numeric[B]): B

    Multiplies up the elements of this collection

  87. def projection: SeqView[A, Repr]

    returns a projection that can be used to call non-strict filter, map, and flatMap methods that build projections of the collection

  88. def reduceLeft[B >: A](f: (B, A) ⇒ B): B

    Applies a binary operator to all elements of this sequence, going left to right

  89. def reduceLeftOption[B >: A](op: (B, A) ⇒ B): Option[B]

    Optionally applies a binary operator to all elements of this sequence, going left to right

  90. def reduceRight[B >: A](op: (A, B) ⇒ B): B

    Applies a binary operator to all elements of this sequence, going right to left

  91. def reduceRightOption[B >: A](op: (A, B) ⇒ B): Option[B]

    Optionally applies a binary operator to all elements of this sequence, going right to left

  92. def removeDuplicates: Stream[A]

    Builds a new stream from this stream in which any duplicates (wrt to ==) removed

  93. def repr: Repr

    The collection of type sequence underlying this TraversableLike object

  94. def reverse: Stream[A]

    A list consisting of all elements of this list in reverse order

  95. def reverseIterator: Iterator[A]

    An iterator yielding elements in reversed order

  96. def reverseMap[B, That](f: (A) ⇒ B)(bf: CanBuildFrom[Repr, B, That]): That

    Builds a new collection by applying a function to all elements of this sequence and collecting the results in reversed order

  97. def reversedElements: Iterator[A]

  98. def sameElements[B >: A](that: Iterable[B]): Boolean

    Checks if the other iterable collection contains the same elements in the same order as this sequence

  99. def segmentLength(p: (A) ⇒ Boolean, from: Int): Int

    Computes length of longest segment whose elements all satisfy some preficate

  100. def size: Int

    The size of this sequence, equivalent to length

  101. def slice(start: Int, end: Int): Stream[A]

    A substream starting at index from and extending up to (but not including) index until

  102. def sortBy[B](f: (A) ⇒ B)(ord: Ordering[B]): Repr

    Sorts this LinearSeq according to the Ordering which results from transforming an implicitly given Ordering with a transformation function

  103. def sortWith[B >: A](ord: Ordering[B]): Repr

    Sorts this sequence according to an Ordering

  104. def sortWith(lt: (A, A) ⇒ Boolean): Repr

    Sorts this sequence according to a comparison function

  105. def span(p: (A) ⇒ Boolean): (Repr, Repr)

    Spits this sequence into a prefix/suffix pair according to a predicate

  106. def splitAt(n: Int): (Repr, Repr)

    Splits this sequence into two at a given position

  107. def startsWith[B](that: Seq[B]): Boolean

    Tests whether this sequence starts with the given sequence

  108. def startsWith[B](that: Seq[B], offset: Int): Boolean

    Tests whether this sequence contains the given sequence at a given index

  109. def stringPrefix: String

    Defines the prefix of this object's toString representation as Stream

  110. def sum[B >: A](num: Numeric[B]): B

    Sums up the elements of this collection

  111. def tail: Nothing

    A stream consisting of the remaining elements of this stream after the first one

  112. def tailDefined: Boolean

    Is the tail of this stream defined?

  113. def take(n: Int): Stream[A]

    Returns the n first elements of this stream, or else the whole stream, if it has less than n elements

  114. def takeRight(n: Int): Stream[A]

    Returns the rightmost n elements from this iterable

  115. def takeWhile(p: (A) ⇒ Boolean): Stream[A]

    Returns the longest prefix of this stream whose elements satisfy the predicate p

  116. def toArray[B >: A](arg0: ClassManifest[B]): Array[B]

    Converts this sequence to an array

  117. def toIndexedSeq[B >: A]: IndexedSeq[B]

    Converts this sequence to an indexed sequence

  118. def toIterable: Iterable[A]

    Converts this sequence to an iterable collection

  119. def toList: List[A]

    Converts this sequence to a list

  120. def toSeq: Seq[A]

    Converts this sequence to a sequence

  121. def toSet[B >: A]: Set[B]

    Converts this sequence to a set

  122. def toStream: Stream[A]

    Converts this sequence to a stream

  123. def toString(): String

    Converts this sequence to a string

  124. def transpose[B](asTraversable: (A) ⇒ Traversable[B]): CC[CC[B] @scala.annotation.unchecked.uncheckedVariance]

    Transposes this sequence of traversable collections into

  125. def union[B >: A, That](that: Seq[B])(bf: CanBuildFrom[Repr, B, That]): That

    Produces a new sequence which contains all elements of this sequence and also all elements of a given sequence

  126. def unzip[A1, A2](asPair: (A) ⇒ (A1, A2)): (CC[A1], CC[A2])

    Converts this sequence of pairs into two collections of the first and second halfs of each pair

  127. def updated[B >: A, That](index: Int, elem: B)(bf: CanBuildFrom[Repr, B, That]): That

    A copy of this sequence with one single replaced element

  128. def view(from: Int, until: Int): SeqView[A, Repr]

    Creates a non-strict view of a slice of this sequence

  129. def view: SeqView[A, Repr]

    Creates a non-strict view of this sequence

  130. def withFilter(p: (A) ⇒ Boolean): WithFilter

    Creates a non-strict filter of this sequence

  131. def zipAll[B, A1 >: A, That](that: Iterable[B], thisElem: A1, thatElem: B)(bf: CanBuildFrom[Repr, (A1, B), That]): That

    Returns a sequence formed from this sequence and another iterable collection by combining corresponding elements in pairs

  132. def zipWithIndex[A1 >: A, That](bf: CanBuildFrom[Stream[A], (A1, Int), That]): That

    Zips this iterable with its indices