c

strawman.collection

AbstractIterator

abstract class AbstractIterator[+A] extends Iterator[A]

Explicit instantiation of the Iterator trait to reduce class file size in subclasses.

Linear Supertypes
Iterator[A], IterableOnce[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AbstractIterator
  2. Iterator
  3. IterableOnce
  4. AnyRef
  5. Any
Implicitly
  1. by iterableOnceExtensionMethods
  2. by toOldIterator
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AbstractIterator()

Type Members

  1. class GroupedIterator [B >: A] extends Iterator[Seq[B]]

    A flexible iterator for transforming an Iterator[A] into an Iterator[Seq[A]], with configurable sequence size, step, and strategy for dealing with elements which don't fit evenly.

    A flexible iterator for transforming an Iterator[A] into an Iterator[Seq[A]], with configurable sequence size, step, and strategy for dealing with elements which don't fit evenly.

    Typical uses can be achieved via methods grouped and sliding.

    Definition Classes
    Iterator

Abstract Value Members

  1. abstract def hasNext: Boolean
    Definition Classes
    Iterator
  2. abstract def next(): A
    Definition Classes
    Iterator
    Annotations
    @throws( ... )

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def ++[B >: A](xs: ⇒ IterableOnce[B]): Iterator[B]
    Definition Classes
    Iterator
    Annotations
    @inline()
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder

    Appends all elements of this iterator to a string builder using start, end, and separator strings.

    Appends all elements of this iterator to a string builder using start, end, and separator strings. The written text begins with the string start and ends with the string end. Inside, the string representations (w.r.t. the method toString) of all elements of this iterator are separated by the string sep.

    Example:

    scala> val a = List(1,2,3,4)
    a: List[Int] = List(1, 2, 3, 4)
    
    scala> val b = new StringBuilder()
    b: StringBuilder =
    
    scala> a.addString(b , "List(" , ", " , ")")
    res5: StringBuilder = List(1, 2, 3, 4)
    b

    the string builder to which elements are appended.

    start

    the starting string.

    sep

    the separator string.

    end

    the ending string.

    returns

    the string builder b to which elements were appended.

    Definition Classes
    Iterator
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def buffered: BufferedIterator[A]

    Creates a buffered iterator from this iterator.

    Creates a buffered iterator from this iterator.

    returns

    a buffered iterator producing the same values as this iterator.

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on, and use only the iterator that was returned. Using the old iterator is undefined, subject to change, and may result in changes to the new iterator as well.

    See also

    scala.collection.BufferedIterator

  8. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def collect[B](pf: PartialFunction[A, B]): Iterator[B]

    Creates an iterator by transforming values produced by this iterator with a partial function, dropping those values for which the partial function is not defined.

    Creates an iterator by transforming values produced by this iterator with a partial function, dropping those values for which the partial function is not defined.

    pf

    the partial function which filters and maps the iterator.

    returns

    a new iterator which yields each value x produced by this iterator for which pf is defined the image pf(x).

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on, and use only the iterator that was returned. Using the old iterator is undefined, subject to change, and may result in changes to the new iterator as well.

  10. def concat[B >: A](xs: ⇒ IterableOnce[B]): Iterator[B]
    Definition Classes
    Iterator
  11. def contains(elem: Any): Boolean

    Tests whether this iterator contains a given value as an element.

    Tests whether this iterator contains a given value as an element.

    Note: may not terminate for infinite iterators.

    elem

    the element to test.

    returns

    true if this iterator produces some value that is is equal (as determined by ==) to elem, false otherwise.

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on. Using it is undefined and subject to change.

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

    Counts the number of elements in the iterator which satisfy a predicate.

    Counts the number of elements in the iterator which satisfy a predicate.

    p

    the predicate used to test elements.

    returns

    the number of elements satisfying the predicate p.

    Definition Classes
    Iterator
  13. def distinct: Iterator[A]

    Builds a new iterator from this one without any duplicated elements on it.

    Builds a new iterator from this one without any duplicated elements on it.

    returns

    iterator with distinct elements

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on. Using it is undefined and subject to change.

  14. def distinctBy[B](f: (A) ⇒ B): Iterator[A]

    Builds a new iterator from this one without any duplicated elements as determined by == after applying the transforming function f.

    Builds a new iterator from this one without any duplicated elements as determined by == after applying the transforming function f.

    B

    the type of the elements after being transformed by f

    f

    The transforming function whose result is used to determine the uniqueness of each element

    returns

    iterator with distinct elements

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on. Using it is undefined and subject to change.

  15. def drop(n: Int): Iterator[A]
    Definition Classes
    Iterator
  16. def dropWhile(p: (A) ⇒ Boolean): Iterator[A]

    Skips longest sequence of elements of this iterator which satisfy given predicate p, and returns an iterator of the remaining elements.

    Skips longest sequence of elements of this iterator which satisfy given predicate p, and returns an iterator of the remaining elements.

    p

    the predicate used to skip elements.

    returns

    an iterator consisting of the remaining elements

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on, and use only the iterator that was returned. Using the old iterator is undefined, subject to change, and may result in changes to the new iterator as well.

  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  19. def exists(p: (A) ⇒ Boolean): Boolean

    Tests whether a predicate holds for some of the values produced by this iterator.

    Tests whether a predicate holds for some of the values produced by this iterator.

    Note: may not terminate for infinite iterators.

    p

    the predicate used to test elements.

    returns

    true if the given predicate p holds for some of the values produced by this iterator, otherwise false.

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on. Using it is undefined and subject to change.

  20. def filter(p: (A) ⇒ Boolean): Iterator[A]

    Selects all elements of this iterator which satisfy a predicate.

    Selects all elements of this iterator which satisfy a predicate.

    p

    the predicate used to test elements.

    returns

    a new iterator consisting of all elements of this iterator that satisfy the given predicate p. The order of the elements is preserved.

    Definition Classes
    Iterator
  21. def filterNot(p: (A) ⇒ Boolean): Iterator[A]

    Creates an iterator over all the elements of this iterator which do not satisfy a predicate p.

    Creates an iterator over all the elements of this iterator which do not satisfy a predicate p.

    p

    the predicate used to test values.

    returns

    an iterator which produces those values of this iterator which do not satisfy the predicate p.

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on, and use only the iterator that was returned. Using the old iterator is undefined, subject to change, and may result in changes to the new iterator as well.

  22. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. def find(p: (A) ⇒ Boolean): Option[A]

    Finds the first value produced by the iterator satisfying a predicate, if any.

    Finds the first value produced by the iterator satisfying a predicate, if any.

    Note: may not terminate for infinite iterators.

    p

    the predicate used to test values.

    returns

    an option value containing the first value produced by the iterator that satisfies predicate p, or None if none exists.

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on. Using it is undefined and subject to change.

  24. def flatMap[B](f: (A) ⇒ IterableOnce[B]): Iterator[B]
    Definition Classes
    Iterator
  25. def foldLeft[B](z: B)(op: (B, A) ⇒ B): B
    Definition Classes
    Iterator
  26. def foldRight[B](z: B)(op: (A, B) ⇒ B): B
    Definition Classes
    Iterator
  27. def forall(p: (A) ⇒ Boolean): Boolean

    Tests whether a predicate holds for all values produced by this iterator.

    Tests whether a predicate holds for all values produced by this iterator.

    Note: may not terminate for infinite iterators.

    p

    the predicate used to test elements.

    returns

    true if the given predicate p holds for all values produced by this iterator, otherwise false.

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on. Using it is undefined and subject to change.

  28. def foreach[U](f: (A) ⇒ U): Unit
    Definition Classes
    Iterator
  29. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  30. def grouped[B >: A](size: Int): GroupedIterator[B]

    Returns an iterator which groups this iterator into fixed size blocks.

    Returns an iterator which groups this iterator into fixed size blocks. Example usages:

    // Returns List(List(1, 2, 3), List(4, 5, 6), List(7)))
    (1 to 7).iterator grouped 3 toList
    // Returns List(List(1, 2, 3), List(4, 5, 6))
    (1 to 7).iterator grouped 3 withPartial false toList
    // Returns List(List(1, 2, 3), List(4, 5, 6), List(7, 20, 25)
    // Illustrating that withPadding's argument is by-name.
    val it2 = Iterator.iterate(20)(_ + 5)
    (1 to 7).iterator grouped 3 withPadding it2.next toList
    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on, and use only the iterator that was returned. Using the old iterator is undefined, subject to change, and may result in changes to the new iterator as well.

  31. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  32. def indexOf[B >: A](elem: B, from: Int): Int

    Returns the index of the first occurrence of the specified object in this iterable object after or at some start index.

    Returns the index of the first occurrence of the specified object in this iterable object after or at some start index.

    Note: may not terminate for infinite iterators.

    elem

    element to search for.

    from

    the start index

    returns

    the index >= from of the first occurrence of elem in the values produced by this iterator, or -1 if such an element does not exist until the end of the iterator is reached.

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on. Using it is undefined and subject to change.

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

    Returns the index of the first occurrence of the specified object in this iterable object.

    Returns the index of the first occurrence of the specified object in this iterable object.

    Note: may not terminate for infinite iterators.

    elem

    element to search for.

    returns

    the index of the first occurrence of elem in the values produced by this iterator, or -1 if such an element does not exist until the end of the iterator is reached.

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on. Using it is undefined and subject to change.

  34. def indexWhere(p: (A) ⇒ Boolean, from: Int = 0): Int
    Definition Classes
    Iterator
  35. def isEmpty: Boolean

    Tests whether this iterator is empty.

    Tests whether this iterator is empty.

    returns

    true if hasNext is false, false otherwise.

    Definition Classes
    Iterator
    Note

    Reuse: The iterator remains valid for further use whatever result is returned.

  36. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  37. val it: Iterator[A]
    Implicit
    This member is added by an implicit conversion from AbstractIterator[A] to toOldIterator[A] performed by method toOldIterator in strawman.collection.
    Definition Classes
    toOldIterator
  38. def iterator(): Iterator[A]

    Iterator can be used only once

    Iterator can be used only once

    Definition Classes
    IteratorIterableOnce
  39. final def knownSize: Int

    returns

    The number of elements of this iterator if it can be computed in O(1) time, otherwise -1

    Definition Classes
    IteratorIterableOnce
  40. def length: Int
    Definition Classes
    Iterator
  41. def map[B](f: (A) ⇒ B): Iterator[B]
    Definition Classes
    Iterator
  42. def max: A

    [use case] Finds the largest element.

    [use case]

    Finds the largest element.

    returns

    the largest element of this iterator.

    Definition Classes
    Iterator
    Full Signature

    def max[B >: A](implicit ord: Ordering[B]): A

  43. def maxBy[B](f: (A) ⇒ B): A

    [use case] Finds the first element which yields the largest value measured by function f.

    [use case]

    Finds the first element which yields the largest value measured by function f.

    B

    The result type of the function f.

    f

    The measuring function.

    returns

    the first element of this iterator with the largest value measured by function f.

    Definition Classes
    Iterator
    Full Signature

    def maxBy[B](f: (A) ⇒ B)(implicit cmp: Ordering[B]): A

  44. def min: A

    [use case] Finds the smallest element.

    [use case]

    Finds the smallest element.

    returns

    the smallest element of this iterator

    Definition Classes
    Iterator
    Full Signature

    def min[B >: A](implicit ord: Ordering[B]): A

  45. def minBy[B](f: (A) ⇒ B): A

    [use case] Finds the first element which yields the smallest value measured by function f.

    [use case]

    Finds the first element which yields the smallest value measured by function f.

    B

    The result type of the function f.

    f

    The measuring function.

    returns

    the first element of this iterator with the smallest value measured by function f.

    Definition Classes
    Iterator
    Full Signature

    def minBy[B](f: (A) ⇒ B)(implicit cmp: Ordering[B]): A

  46. def mkString: String
    Definition Classes
    Iterator
  47. def mkString(sep: String): String
    Definition Classes
    Iterator
  48. def mkString(start: String, sep: String, end: String): String
    Definition Classes
    Iterator
  49. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  50. def nextOption(): Option[A]

    Wraps the value of next() in an option.

    Wraps the value of next() in an option.

    returns

    Some(next) if a next element exists, None otherwise.

    Definition Classes
    Iterator
  51. final def notify(): Unit
    Definition Classes
    AnyRef
  52. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  53. def patch[B >: A](from: Int, patchElems: Iterator[B], replaced: Int): Iterator[B]

    Returns this iterator with patched values.

    Returns this iterator with patched values. Patching at negative indices is the same as patching starting at 0. Patching at indices at or larger than the length of the original iterator appends the patch to the end. If more values are replaced than actually exist, the excess is ignored.

    from

    The start index from which to patch

    patchElems

    The iterator of patch values

    replaced

    The number of values in the original iterator that are replaced by the patch.

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on, as well as the one passed as a parameter, and use only the iterator that was returned. Using the old iterators is undefined, subject to change, and may result in changes to the new iterator as well.

  54. def product: A

    [use case] Multiplies up the elements of this collection.

    [use case]

    Multiplies up the elements of this collection.

    returns

    the product of all elements in this iterator of numbers of type Int. Instead of Int, any other type T with an implicit Numeric[T] implementation can be used as element type of the iterator and as result type of product. Examples of such types are: Long, Float, Double, BigInt.

    Definition Classes
    Iterator
    Full Signature

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

  55. def reduce[B >: A](op: (B, B) ⇒ B): B

    Reduces the elements of this iterator using the specified associative binary operator.

    Reduces the elements of this iterator using the specified associative binary operator.

    $undefinedorder

    B

    A type parameter for the binary operator, a supertype of A.

    op

    A binary operator that must be associative.

    returns

    The result of applying reduce operator op between all the elements if the iterator is nonempty.

    Definition Classes
    Iterator
    Exceptions thrown

    UnsupportedOperationException if this iterator is empty.

  56. def reduceLeft[B >: A](op: (B, A) ⇒ B): B

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

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

    Note: will not terminate for infinite iterators.

    Note: might return different results for different runs, unless the underlying collection type is ordered or the operator is associative and commutative.

    B

    the result type of the binary operator.

    op

    the binary operator.

    returns

    the result of inserting op between consecutive elements of this iterator, going left to right:

    op( op( ... op(x_1, x_2) ..., x_{n-1}), x_n)

    where x1, ..., xn are the elements of this iterator.

    Definition Classes
    Iterator
    Exceptions thrown

    UnsupportedOperationException if this iterator is empty.

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

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

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

    Note: will not terminate for infinite iterators.

    Note: might return different results for different runs, unless the underlying collection type is ordered or the operator is associative and commutative.

    B

    the result type of the binary operator.

    op

    the binary operator.

    returns

    an option value containing the result of reduceLeft(op) if this iterator is nonempty, None otherwise.

    Definition Classes
    Iterator
  58. def reduceOption[B >: A](op: (B, B) ⇒ B): Option[B]

    Reduces the elements of this iterator, if any, using the specified associative binary operator.

    Reduces the elements of this iterator, if any, using the specified associative binary operator.

    $undefinedorder

    B

    A type parameter for the binary operator, a supertype of A.

    op

    A binary operator that must be associative.

    returns

    An option value containing result of applying reduce operator op between all the elements if the collection is nonempty, and None otherwise.

    Definition Classes
    Iterator
  59. def reduceRight[B >: A](op: (A, B) ⇒ B): B

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

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

    Note: will not terminate for infinite iterators.

    Note: might return different results for different runs, unless the underlying collection type is ordered or the operator is associative and commutative.

    B

    the result type of the binary operator.

    op

    the binary operator.

    returns

    the result of inserting op between consecutive elements of this iterator, going right to left:

    op(x_1, op(x_2, ..., op(x_{n-1}, x_n)...))

    where x1, ..., xn are the elements of this iterator.

    Definition Classes
    Iterator
    Exceptions thrown

    UnsupportedOperationException if this iterator is empty.

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

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

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

    Note: will not terminate for infinite iterators.

    Note: might return different results for different runs, unless the underlying collection type is ordered or the operator is associative and commutative.

    B

    the result type of the binary operator.

    op

    the binary operator.

    returns

    an option value containing the result of reduceRight(op) if this iterator is nonempty, None otherwise.

    Definition Classes
    Iterator
  61. def reversed: Iterable[A]
    Attributes
    protected[this]
    Definition Classes
    Iterator
  62. def sameElements[B >: A](that: IterableOnce[B]): Boolean
    Definition Classes
    Iterator
  63. def scanLeft[B](z: B)(op: (B, A) ⇒ B): Iterator[B]

    Produces a collection containing cumulative results of applying the operator going left to right.

    Produces a collection containing cumulative results of applying the operator going left to right.

    Note: will not terminate for infinite iterators.

    Note: might return different results for different runs, unless the underlying collection type is ordered.

    B

    the type of the elements in the resulting collection

    z

    the initial value

    op

    the binary operator applied to the intermediate result and the element

    returns

    iterator with intermediate results

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on, and use only the iterator that was returned. Using the old iterator is undefined, subject to change, and may result in changes to the new iterator as well.

  64. final def size: Int
    Definition Classes
    Iterator
  65. def slice(from: Int, until: Int): Iterator[A]

    Creates an iterator returning an interval of the values produced by this iterator.

    Creates an iterator returning an interval of the values produced by this iterator.

    from

    the index of the first element in this iterator which forms part of the slice. If negative, the slice starts at zero.

    until

    the index of the first element following the slice. If negative, the slice is empty.

    returns

    an iterator which advances this iterator past the first from elements using drop, and then takes until - from elements, using take.

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on, and use only the iterator that was returned. Using the old iterator is undefined, subject to change, and may result in changes to the new iterator as well.

  66. def sliceIterator(from: Int, until: Int): Iterator[A]

    Creates an optionally bounded slice, unbounded if until is negative.

    Creates an optionally bounded slice, unbounded if until is negative.

    Attributes
    protected
    Definition Classes
    Iterator
  67. def sliding[B >: A](size: Int, step: Int = 1): GroupedIterator[B]

    Returns an iterator which presents a "sliding window" view of this iterator.

    Returns an iterator which presents a "sliding window" view of this iterator. The first argument is the window size, and the second argument step is how far to advance the window on each iteration. The step defaults to 1.

    The default GroupedIterator can be configured to either pad a partial result to size size or suppress the partial result entirely.

    Example usages:

    // Returns List(List(1, 2, 3), List(2, 3, 4), List(3, 4, 5))
    (1 to 5).iterator.sliding(3).toList
    // Returns List(List(1, 2, 3, 4), List(4, 5))
    (1 to 5).iterator.sliding(4, 3).toList
    // Returns List(List(1, 2, 3, 4))
    (1 to 5).iterator.sliding(4, 3).withPartial(false).toList
    // Returns List(List(1, 2, 3, 4), List(4, 5, 20, 25))
    // Illustrating that withPadding's argument is by-name.
    val it2 = Iterator.iterate(20)(_ + 5)
    (1 to 5).iterator.sliding(4, 3).withPadding(it2.next).toList
    returns

    An iterator producing Seq[B]s of size size, except the last element (which may be the only element) will be truncated if there are fewer than size elements remaining to be grouped. This behavior can be configured.

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on, and use only the iterator that was returned. Using the old iterator is undefined, subject to change, and may result in changes to the new iterator as well.

  68. def sum: A

    [use case] Sums up the elements of this collection.

    [use case]

    Sums up the elements of this collection.

    returns

    the sum of all elements in this iterator of numbers of type Int. Instead of Int, any other type T with an implicit Numeric[T] implementation can be used as element type of the iterator and as result type of sum. Examples of such types are: Long, Float, Double, BigInt.

    Definition Classes
    Iterator
    Full Signature

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

  69. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  70. def take(n: Int): Iterator[A]
    Definition Classes
    Iterator
  71. def takeWhile(p: (A) ⇒ Boolean): Iterator[A]

    Takes longest prefix of values produced by this iterator that satisfy a predicate.

    Takes longest prefix of values produced by this iterator that satisfy a predicate.

    p

    The predicate used to test elements.

    returns

    An iterator returning the values produced by this iterator, until this iterator produces a value that does not satisfy the predicate p.

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on, and use only the iterator that was returned. Using the old iterator is undefined, subject to change, and may result in changes to the new iterator as well.

  72. def to[C](factory: Factory[A, C]): C

    Converts this Iterator into another collection.

    Converts this Iterator into another collection.

    C

    The collection type to build.

    factory

    Collection factory to use. The factory may or may not eagerly consume this iterator.

    returns

    a new collection containing all elements of this Iterator.

    Definition Classes
    Iterator
  73. def toClassic: scala.Iterator[A]
    Implicit
    This member is added by an implicit conversion from AbstractIterator[A] to toOldIterator[A] performed by method toOldIterator in strawman.collection.
    Definition Classes
    toOldIterator
  74. def toString(): String
    Definition Classes
    AnyRef → Any
  75. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  76. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  77. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  78. def withFilter(p: (A) ⇒ Boolean): Iterator[A]

    Creates an iterator over all the elements of this iterator that satisfy the predicate p.

    Creates an iterator over all the elements of this iterator that satisfy the predicate p. The order of the elements is preserved.

    Note: withFilter is the same as filter on iterators. It exists so that for-expressions with filters work over iterators.

    p

    the predicate used to test values.

    returns

    an iterator which produces those values of this iterator which satisfy the predicate p.

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on, and use only the iterator that was returned. Using the old iterator is undefined, subject to change, and may result in changes to the new iterator as well.

  79. def zip[B](that: IterableOnce[B]): Iterator[(A, B)]
    Definition Classes
    Iterator
  80. def zipWithIndex: Iterator[(A, Int)]

    Creates an iterator that pairs each element produced by this iterator with its index, counting from 0.

    Creates an iterator that pairs each element produced by this iterator with its index, counting from 0.

    returns

    a new iterator containing pairs consisting of corresponding elements of this iterator and their indices.

    Definition Classes
    Iterator
    Note

    Reuse: After calling this method, one should discard the iterator it was called on, and use only the iterator that was returned. Using the old iterator is undefined, subject to change, and may result in changes to the new iterator as well.

Deprecated Value Members

  1. def find(p: (A) ⇒ Boolean): Option[A]
    Implicit
    This member is added by an implicit conversion from AbstractIterator[A] to IterableOnceExtensionMethods[A] performed by method iterableOnceExtensionMethods in strawman.collection.IterableOnce.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (abstractIterator: IterableOnceExtensionMethods[A]).find(p)
    Definition Classes
    IterableOnceExtensionMethods
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use .iterator().find instead of .find on IterableOnce

  2. def foreach[U](f: (A) ⇒ U): Unit
    Implicit
    This member is added by an implicit conversion from AbstractIterator[A] to IterableOnceExtensionMethods[A] performed by method iterableOnceExtensionMethods in strawman.collection.IterableOnce.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (abstractIterator: IterableOnceExtensionMethods[A]).foreach(f)
    Definition Classes
    IterableOnceExtensionMethods
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use .iterator().foreach(...) instead of .foreach(...) on IterableOnce

  3. def isEmpty: Boolean
    Implicit
    This member is added by an implicit conversion from AbstractIterator[A] to IterableOnceExtensionMethods[A] performed by method iterableOnceExtensionMethods in strawman.collection.IterableOnce.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (abstractIterator: IterableOnceExtensionMethods[A]).isEmpty
    Definition Classes
    IterableOnceExtensionMethods
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use .iterator().isEmpty instead of .isEmpty on IterableOnce

  4. def mkString: String
    Implicit
    This member is added by an implicit conversion from AbstractIterator[A] to IterableOnceExtensionMethods[A] performed by method iterableOnceExtensionMethods in strawman.collection.IterableOnce.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (abstractIterator: IterableOnceExtensionMethods[A]).mkString
    Definition Classes
    IterableOnceExtensionMethods
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use .iterator().mkString instead of .mkString on IterableOnce

  5. def mkString(sep: String): String
    Implicit
    This member is added by an implicit conversion from AbstractIterator[A] to IterableOnceExtensionMethods[A] performed by method iterableOnceExtensionMethods in strawman.collection.IterableOnce.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (abstractIterator: IterableOnceExtensionMethods[A]).mkString(sep)
    Definition Classes
    IterableOnceExtensionMethods
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use .iterator().mkString instead of .mkString on IterableOnce

  6. def mkString(start: String, sep: String, end: String): String
    Implicit
    This member is added by an implicit conversion from AbstractIterator[A] to IterableOnceExtensionMethods[A] performed by method iterableOnceExtensionMethods in strawman.collection.IterableOnce.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (abstractIterator: IterableOnceExtensionMethods[A]).mkString(start, sep, end)
    Definition Classes
    IterableOnceExtensionMethods
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use .iterator().mkString instead of .mkString on IterableOnce

  7. def toArray[B >: A](implicit arg0: ClassTag[B]): Array[B]
    Implicit
    This member is added by an implicit conversion from AbstractIterator[A] to IterableOnceExtensionMethods[A] performed by method iterableOnceExtensionMethods in strawman.collection.IterableOnce.
    Definition Classes
    IterableOnceExtensionMethods
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use ArrayBuffer.fromIterable(it).toArray instead of it.toArray on Iterable (wrap Iterators with View.fromIterator first)

  8. def toBuffer[B >: A]: Buffer[B]
    Implicit
    This member is added by an implicit conversion from AbstractIterator[A] to IterableOnceExtensionMethods[A] performed by method iterableOnceExtensionMethods in strawman.collection.IterableOnce.
    Definition Classes
    IterableOnceExtensionMethods
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use ArrayBuffer.fromIterable(it) instead of it.toBuffer on Iterable (wrap Iterators with View.fromIterator first)

  9. def toList[B >: A]: List[B]
    Implicit
    This member is added by an implicit conversion from AbstractIterator[A] to IterableOnceExtensionMethods[A] performed by method iterableOnceExtensionMethods in strawman.collection.IterableOnce.
    Definition Classes
    IterableOnceExtensionMethods
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use List.fromIterable(it) instead of it.toList on Iterable (wrap Iterators with View.fromIterator first)

Inherited from Iterator[A]

Inherited from IterableOnce[A]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion iterableOnceExtensionMethods from AbstractIterator[A] to IterableOnceExtensionMethods[A]

Inherited by implicit conversion toOldIterator from AbstractIterator[A] to toOldIterator[A]

Ungrouped