com.nicta.scoobi.core

Iterator1

trait Iterator1[+A] extends TraversableOnce[A]

A non-empty iterator contains at least one element. Consequences include:

- reduceLeft will always produce a value. - first will always produce a value. - next will always produce a value on its first invocation. - hasNext will always return true on its first invocation. - scanLeft1 will always produce a value.

Some operations on a non-empty iterator result in a non-empty iterator.

Construction of an Iterator1 is typically performed with the +:: method, defined on Iterator1.RichIterator.

For example:

import Iterator1._

// A regular iterator.
val x: Iterator[Int] = ...
// Constructs a non-empty iterator with 74 at the first.
val y: Iterator1[Int] = 77 +:: x

NOTE: Most Iterator functions perform SIDE-EFFECTS and so EQUATIONAL REASONING DOES NOT APPLY.

Linear Supertypes
TraversableOnce[A], GenTraversableOnce[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Iterator1
  2. TraversableOnce
  3. GenTraversableOnce
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def first: A

    The constant first element of this iterator.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. def ++[AA >: A](that: ⇒ Iterator1[AA]): Iterator1[AA]

    Append the given iterator to this iterator.

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

    Definition Classes
    TraversableOnce → GenTraversableOnce
  5. def :\[B](z: B)(op: (A, B) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  6. def <*>:[B](f: Iterator1[(A) ⇒ B]): Iterator1[B]

    Runs the iterator sequence effect (flatMap) of functions on this iterator.

    Runs the iterator sequence effect (flatMap) of functions on this iterator. Synonym for ap.

  7. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  8. def addString(b: StringBuilder): StringBuilder

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

    Definition Classes
    TraversableOnce
  10. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder

    Definition Classes
    TraversableOnce
  11. def aggregate[B](z: ⇒ B)(seqop: (B, A) ⇒ B, combop: (B, B) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  12. def ap[B](f: Iterator1[(A) ⇒ B]): Iterator1[B]

    Runs the iterator sequence effect (flatMap) of functions on this iterator.

    Runs the iterator sequence effect (flatMap) of functions on this iterator. Synonym for <*>:.

  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. def clone(): AnyRef

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

    Return the first element in the iterator satisfying the given predicate, mapping the given function.

  16. def collectFirst[B](pf: PartialFunction[A, B]): Option[B]

    Definition Classes
    TraversableOnce
  17. def contains(elem: Any): Boolean

    True if any elements of the iterator are equal to the given value.

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

    Copies this iterator to an array at the given interval.

    Copies this iterator to an array at the given interval.

    Definition Classes
    Iterator1 → TraversableOnce → GenTraversableOnce
  19. def copyToArray[B >: A](xs: Array[B]): Unit

    Definition Classes
    TraversableOnce → GenTraversableOnce
  20. def copyToArray[B >: A](xs: Array[B], start: Int): Unit

    Definition Classes
    TraversableOnce → GenTraversableOnce
  21. def copyToBuffer[B >: A](dest: Buffer[B]): Unit

    Definition Classes
    TraversableOnce
  22. def count(p: (A) ⇒ Boolean): Int

    Definition Classes
    TraversableOnce → GenTraversableOnce
  23. def drop(n: Int): Iterator[A]

    Drop at most the given number of elements from the front of the iterator.

  24. def dropWhile(p: (A) ⇒ Boolean): Iterator[A]

    Drop elements from the front of the iterator satisfying the given predicate.

  25. def duplicate: (Iterator1[A], Iterator1[A])

    Creates two new iterators that both iterate over the same elements as this iterator (in the same order).

    Creates two new iterators that both iterate over the same elements as this iterator (in the same order). The duplicate iterators are considered equal if they are positioned at the same element.

  26. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  28. def exists(p: (A) ⇒ Boolean): Boolean

    True if any elements of the iterator satisfy the given predicate.

    True if any elements of the iterator satisfy the given predicate.

    Definition Classes
    Iterator1 → TraversableOnce → GenTraversableOnce
  29. def filter(p: (A) ⇒ Boolean): Iterator[A]

    Return an iterator with only the elements satisfying the predicate.

  30. def filterNot(p: (A) ⇒ Boolean): Iterator[A]

    Return an iterator with only the elements not satisfying the predicate.

  31. def finalize(): Unit

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

    Return the first element in the iterator satisfying the given predicate.

    Return the first element in the iterator satisfying the given predicate.

    Definition Classes
    Iterator1 → TraversableOnce → GenTraversableOnce
  33. def flatMap[B](f: (A) ⇒ Iterator1[B]): Iterator1[B]

    Sequence an iterator function on all elements of the iterator.

  34. def flatten[I](implicit I1: (A) ⇒ Iterator1[I]): Iterator1[I]

    Flatten an iterator of iterator.

  35. def fold[A1 >: A](z: A1)(op: (A1, A1) ⇒ A1): A1

    Definition Classes
    TraversableOnce → GenTraversableOnce
  36. def foldLeft[B](z: B)(op: (B, A) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  37. def foldRight[B](z: B)(op: (A, B) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  38. def forall(p: (A) ⇒ Boolean): Boolean

    True if all elements of the iterator satisfy the given predicate.

    True if all elements of the iterator satisfy the given predicate.

    Definition Classes
    Iterator1 → TraversableOnce → GenTraversableOnce
  39. def foreach[U](f: (A) ⇒ U): Unit

    Execute an effect for each element of the iterator.

    Execute an effect for each element of the iterator.

    Definition Classes
    Iterator1 → TraversableOnce → GenTraversableOnce
  40. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  41. def hasDefiniteSize: Boolean

    A non-empty iterator always has a definite size.

    A non-empty iterator always has a definite size.

    Definition Classes
    Iterator1 → TraversableOnce → GenTraversableOnce
  42. def hasNext: Boolean

    True if this iterator can produce a value from next.

  43. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  44. def indexOf[AA >: A](elem: AA): Int

    Return the index (starting at 0) of the first element in the iterator equal to the given value or -1 if no such element exists.

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

    Return the index (starting at 0) of the first element in the iterator satisfying the given predicate or -1 if no such element exists.

  46. def isEmpty: Boolean

    The negation of hasNext.

    The negation of hasNext.

    Definition Classes
    Iterator1 → TraversableOnce → GenTraversableOnce
  47. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  48. def isTraversableAgain: Boolean

    A non-empty iterator is never traversable again.

    A non-empty iterator is never traversable again.

    Definition Classes
    Iterator1 → GenTraversableOnce
  49. def length: Int

    Return the number of elements in the iterator.

  50. def map[B](f: (A) ⇒ B): Iterator1[B]

    Map a function on all elements of the iterator.

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

    Definition Classes
    TraversableOnce → GenTraversableOnce
  52. def maxBy[B](f: (A) ⇒ B)(implicit cmp: Ordering[B]): A

    Definition Classes
    TraversableOnce → GenTraversableOnce
  53. def min[B >: A](implicit cmp: Ordering[B]): A

    Definition Classes
    TraversableOnce → GenTraversableOnce
  54. def minBy[B](f: (A) ⇒ B)(implicit cmp: Ordering[B]): A

    Definition Classes
    TraversableOnce → GenTraversableOnce
  55. def mkString: String

    Definition Classes
    TraversableOnce → GenTraversableOnce
  56. def mkString(sep: String): String

    Definition Classes
    TraversableOnce → GenTraversableOnce
  57. def mkString(start: String, sep: String, end: String): String

    Definition Classes
    TraversableOnce → GenTraversableOnce
  58. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  59. def next: A

    Produces a value if possible, or throws an exception if not possible.

    Produces a value if possible, or throws an exception if not possible. The method hasNext determines if a value can be produced.

  60. def nonEmpty: Boolean

    Definition Classes
    TraversableOnce → GenTraversableOnce
  61. final def notify(): Unit

    Definition Classes
    AnyRef
  62. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  63. def padTo[AA >: A](len: Int, elem: AA): Iterator1[AA]

    Appends an element value to the iterator until a given target length is reached.

  64. def partition(p: (A) ⇒ Boolean): BreakIterator1[A]

    Partition the iterator into those satisfying a predicate and those that do not.

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

    Definition Classes
    TraversableOnce → GenTraversableOnce
  66. def reduce[A1 >: A](op: (A1, A1) ⇒ A1): A1

    Definition Classes
    TraversableOnce → GenTraversableOnce
  67. def reduceLeft[B >: A](op: (B, A) ⇒ B): B

    Definition Classes
    TraversableOnce
  68. def reduceLeftOption[B >: A](op: (B, A) ⇒ B): Option[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  69. def reduceOption[A1 >: A](op: (A1, A1) ⇒ A1): Option[A1]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  70. def reduceRight[B >: A](op: (A, B) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  71. def reduceRightOption[B >: A](op: (A, B) ⇒ B): Option[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  72. def reversed: List[A]

    Attributes
    protected[this]
    Definition Classes
    TraversableOnce
  73. def sameElements(that: Iterator1[_]): Boolean

    True if this iterator produces equal elements to the given iterator in the same order.

  74. def scanLeft[B](z: B)(op: (B, A) ⇒ B): Iterator1[B]

    Produces an iterator containing cumulative results of applying the operator going left to right.

  75. def scanLeft1[AA >: A](op: (AA, A) ⇒ AA): Iterator1[AA]

    Produces an iterator containing cumulative results of applying the operator going left to right, starting at head.

  76. def seq: Iterator[A]

    Return a regular iterator, losing the non-empty invariant in the type.

    Return a regular iterator, losing the non-empty invariant in the type.

    Definition Classes
    Iterator1 → TraversableOnce → GenTraversableOnce
  77. def sequenceFn[X, Y](implicit I: (A) ⇒ (X) ⇒ Y): (X) ⇒ Iterator1[Y]

    Runs the iterator of functions to produce a function to iterators.

  78. def size: Int

    Definition Classes
    TraversableOnce → GenTraversableOnce
  79. def slice(from: Int, to: Int): Iterator[A]

    Returns an interval of elements in the iterator.

  80. def span(p: (A) ⇒ Boolean): BreakIterator1[A]

    Split the iterator, taking from the front while the given predicate satisfies.

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

    Definition Classes
    TraversableOnce → GenTraversableOnce
  82. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  83. def take(n: Int): Iterator[A]

    Take at most the given number of elements from the front of the iterator.

  84. def takeWhile(p: (A) ⇒ Boolean): Iterator[A]

    Take elements from the front of the iterator satisfying the given predicate.

  85. def to[Col[_]](implicit cbf: CanBuildFrom[Nothing, A, Col[A]]): Col[A]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  86. def toArray[B >: A](implicit arg0: ClassTag[B]): Array[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  87. def toBuffer[B >: A]: Buffer[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  88. def toIndexedSeq: IndexedSeq[A]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  89. def toIterable: Iterable[A]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  90. def toIterator: Iterator[A]

    Return a regular iterator, losing the non-empty invariant in the type.

    Return a regular iterator, losing the non-empty invariant in the type.

    Definition Classes
    Iterator1 → GenTraversableOnce
  91. def toList: List[A]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  92. def toMap[T, U](implicit ev: <:<[A, (T, U)]): Map[T, U]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  93. def toSeq: Seq[A]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  94. def toSet[B >: A]: Set[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  95. def toStream: Stream[A]

    Convert this iterator to a stream.

    Convert this iterator to a stream.

    Definition Classes
    Iterator1 → GenTraversableOnce
  96. def toString(): String

    Definition Classes
    Iterator1 → AnyRef → Any
  97. def toTraversable: Traversable[A]

    Returns a stream of this iterator.

    Returns a stream of this iterator.

    Definition Classes
    Iterator1 → TraversableOnce → GenTraversableOnce
  98. def toVector: Vector[A]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  99. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  100. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  101. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  102. def withFilter(p: (A) ⇒ Boolean): Iterator[A]

    Return an iterator with only the elements satisfying the predicate.

  103. def zip[B](that: Iterator1[B]): Iterator1[(A, B)]

    Zip this iterator with the given iterator to produce an iterator of pairs.

  104. def zipAll[B, AA >: A, BB >: B](that: Iterator1[B], thisElem: AA, thatElem: BB): Iterator1[(AA, BB)]

    Creates an iterator formed from this iterator and another iterator by combining corresponding elements in pairs.

  105. def zipWithIndex: Iterator1[(A, Int)]

    Zip this iterator with the infinite iterator from 0 incrementing by 1, to produce an iterator of pairs.

Inherited from TraversableOnce[A]

Inherited from GenTraversableOnce[A]

Inherited from AnyRef

Inherited from Any

Ungrouped