abstract class IntIterator extends AbstractIterator[Int]
Iterator over a collection of primitive int valuea; basically overrides all inherited methods to avoid (un)boxing.
- Self Type
- IntIterator
- Source
- IntIterator.scala
- Note
No guarantee is given what will happen if
next
is called afterhasNext
returns or would have returned false.
- Alphabetic
- By Inheritance
- IntIterator
- AbstractIterator
- Iterator
- IterableOnceOps
- IterableOnce
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new IntIterator()
Type Members
- class GroupedIterator[B >: A] extends AbstractIterator[Seq[B]]
- Definition Classes
- Iterator
Abstract Value Members
- abstract def hasNext: Boolean
- Definition Classes
- Iterator
- abstract def next(): Int
Returns the next value if
hasNext
has returnedtrue
; if hasNext has returnedfalse
andnext
is called, the result is undefined.Returns the next value if
hasNext
has returnedtrue
; if hasNext has returnedfalse
andnext
is called, the result is undefined. The method may throw any exception, e.g., aNullPointerException
, or just return the last value; however, the behavior is undefined and subject to change without notice!- Definition Classes
- IntIterator → Iterator
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ++[B >: Int](xs: => IterableOnce[B]): Iterator[B]
- Definition Classes
- Iterator
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def addString(b: StringBuilder): b.type
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- final def addString(b: StringBuilder, sep: String): b.type
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- def addString(b: StringBuilder, start: String, sep: String, end: String): b.type
- Definition Classes
- IterableOnceOps
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def buffered: BufferedIterator[Int]
- Definition Classes
- Iterator
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def collect[B](pf: PartialFunction[Int, B]): Iterator[B]
- Definition Classes
- Iterator → IterableOnceOps
- def collectFirst[B](pf: PartialFunction[Int, B]): Option[B]
- Definition Classes
- IterableOnceOps
- def concat[B >: Int](xs: => IterableOnce[B]): Iterator[B]
- Definition Classes
- Iterator
- def contains(i: Int): Boolean
- def contains(elem: Any): Boolean
- Definition Classes
- Iterator
- def copyToArray(size: Int): Array[Int]
Copies all elements to a new array of the given size.
Copies all elements to a new array of the given size.
- Note
This method should be overwritten, when the underlying collection is already any array and more efficient operation, aka System.arrayCopy can be used.
- def copyToArray[B >: Int](xs: Array[B], start: Int, len: Int): Int
- Definition Classes
- IterableOnceOps
- def copyToArray[B >: Int](xs: Array[B], start: Int): Int
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecatedOverriding()
- def copyToArray[B >: Int](xs: Array[B]): Int
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecatedOverriding()
- def corresponds[B](that: IterableOnce[B])(p: (Int, B) => Boolean): Boolean
- Definition Classes
- IterableOnceOps
- def count(p: (Int) => Boolean): Int
- Definition Classes
- IterableOnceOps
- def distinct: Iterator[Int]
- Definition Classes
- Iterator
- def distinctBy[B](f: (Int) => B): Iterator[Int]
- Definition Classes
- Iterator
- def drop(n: Int): Iterator[Int]
- Definition Classes
- Iterator → IterableOnceOps
- def dropWhile(p: (Int) => Boolean): Iterator[Int]
- Definition Classes
- Iterator → IterableOnceOps
- def duplicate: (Iterator[Int], Iterator[Int])
- Definition Classes
- Iterator
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def exists(p: (Int) => Boolean): Boolean
- Definition Classes
- IntIterator → IterableOnceOps
- final def filter(p: (Int) => Boolean): IntIterator
- Definition Classes
- IntIterator → Iterator → IterableOnceOps
- def filterNot(p: (Int) => Boolean): Iterator[Int]
- Definition Classes
- Iterator → IterableOnceOps
- def find(p: (Int) => Boolean): Option[Int]
- Definition Classes
- IterableOnceOps
- def flatMap[T](f: (Int) => Iterator[T]): Iterator[T]
- def flatMap(f: (Int) => IntIterator): IntIterator
- def flatMap[B](f: (Int) => IterableOnce[B]): Iterator[B]
- Definition Classes
- Iterator → IterableOnceOps
- def flatten[B](implicit ev: (Int) => IterableOnce[B]): Iterator[B]
- Definition Classes
- Iterator → IterableOnceOps
- def fold[A1 >: Int](z: A1)(op: (A1, A1) => A1): A1
- Definition Classes
- IterableOnceOps
- def foldLeft[T](start: T)(f: (T, Int) => T): T
- Definition Classes
- IntIterator → IterableOnceOps
- def foldLeft(start: Long)(f: (Long, Int) => Long): Long
- def foldLeft(start: Int)(f: (Int, Int) => Int): Int
- def foldRight[B](z: B)(op: (Int, B) => B): B
- Definition Classes
- IterableOnceOps
- def forall(p: (Int) => Boolean): Boolean
- Definition Classes
- IntIterator → IterableOnceOps
- def foreach[U](f: (Int) => U): Unit
- Definition Classes
- IntIterator → IterableOnceOps
- def foreachWhile[U](p: (Int) => Boolean)(f: (Int) => U): Unit
Executes the given function
f
until an element is found for whichp
evaluates tofalse
or all elements have been processed. - final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def grouped[B >: Int](size: Int): GroupedIterator[B]
- Definition Classes
- Iterator
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def indexOf[B >: Int](elem: B, from: Int): Int
- Definition Classes
- Iterator
- def indexOf[B >: Int](elem: B): Int
- Definition Classes
- Iterator
- def indexWhere(p: (Int) => Boolean, from: Int): Int
- Definition Classes
- Iterator
- def isEmpty: Boolean
- Definition Classes
- Iterator → IterableOnceOps
- Annotations
- @deprecatedOverriding()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isTraversableAgain: Boolean
- Definition Classes
- IterableOnceOps
- final def iterator: Iterator[Int]
- Definition Classes
- Iterator → IterableOnce
- Annotations
- @inline()
- def knownSize: Int
- Definition Classes
- IterableOnce
- final def length: Int
- Definition Classes
- Iterator
- Annotations
- @inline()
- def map[T](f: (Int) => T): Iterator[T]
- Definition Classes
- IntIterator → Iterator → IterableOnceOps
- def map(f: (Int) => Long): LongIterator
- def map(f: (Int) => Int): IntIterator
- def max[B >: Int](implicit ord: Ordering[B]): Int
- Definition Classes
- IterableOnceOps
- def maxBy[B](f: (Int) => B)(implicit cmp: Ordering[B]): Int
- Definition Classes
- IterableOnceOps
- def maxByOption[B](f: (Int) => B)(implicit cmp: Ordering[B]): Option[Int]
- Definition Classes
- IterableOnceOps
- def maxOption[B >: Int](implicit ord: Ordering[B]): Option[Int]
- Definition Classes
- IterableOnceOps
- def min[B >: Int](implicit ord: Ordering[B]): Int
- Definition Classes
- IterableOnceOps
- def minBy[B](f: (Int) => B)(implicit cmp: Ordering[B]): Int
- Definition Classes
- IterableOnceOps
- def minByOption[B](f: (Int) => B)(implicit cmp: Ordering[B]): Option[Int]
- Definition Classes
- IterableOnceOps
- def minOption[B >: Int](implicit ord: Ordering[B]): Option[Int]
- Definition Classes
- IterableOnceOps
- final def mkString: String
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- final def mkString(sep: String): String
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- final def mkString(start: String, sep: String, end: String): String
- Definition Classes
- IterableOnceOps
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nextOption(): Option[Int]
- Definition Classes
- Iterator
- def nonEmpty: Boolean
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecatedOverriding()
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def padTo[B >: Int](len: Int, elem: B): Iterator[B]
- Definition Classes
- Iterator
- def partition(p: (Int) => Boolean): (Iterator[Int], Iterator[Int])
- Definition Classes
- Iterator
- def patch[B >: Int](from: Int, patchElems: Iterator[B], replaced: Int): Iterator[B]
- Definition Classes
- Iterator
- def product[B >: Int](implicit num: Numeric[B]): B
- Definition Classes
- IterableOnceOps
- def reduce[B >: Int](op: (B, B) => B): B
- Definition Classes
- IterableOnceOps
- def reduceLeft[B >: Int](op: (B, Int) => B): B
- Definition Classes
- IterableOnceOps
- def reduceLeftOption[B >: Int](op: (B, Int) => B): Option[B]
- Definition Classes
- IterableOnceOps
- def reduceOption[B >: Int](op: (B, B) => B): Option[B]
- Definition Classes
- IterableOnceOps
- def reduceRight[B >: Int](op: (Int, B) => B): B
- Definition Classes
- IterableOnceOps
- def reduceRightOption[B >: Int](op: (Int, B) => B): Option[B]
- Definition Classes
- IterableOnceOps
- def reversed: Iterable[Int]
- Attributes
- protected
- Definition Classes
- IterableOnceOps
- def sameElements[B >: Int](that: IterableOnce[B]): Boolean
- Definition Classes
- Iterator
- def sameValues(that: IntIterator): Boolean
Compares the returned values to check if the iteration order is the same.
Compares the returned values to check if the iteration order is the same.
Both iterators may be consumed up to an arbitrary point.
- def scanLeft[B](z: B)(op: (B, Int) => B): Iterator[B]
- Definition Classes
- Iterator → IterableOnceOps
- def size: Int
- Definition Classes
- IterableOnceOps
- def slice(from: Int, until: Int): Iterator[Int]
- Definition Classes
- Iterator → IterableOnceOps
- def sliceIterator(from: Int, until: Int): Iterator[Int]
- Attributes
- protected
- Definition Classes
- Iterator
- def sliding[B >: Int](size: Int, step: Int): GroupedIterator[B]
- Definition Classes
- Iterator
- def span(p: (Int) => Boolean): (Iterator[Int], Iterator[Int])
- Definition Classes
- Iterator → IterableOnceOps
- def splitAt(n: Int): (Iterator[Int], Iterator[Int])
- Definition Classes
- IterableOnceOps
- def stepper[S <: Stepper[_]](implicit shape: StepperShape[Int, S]): S
- Definition Classes
- IterableOnce
- def sum[B >: Int](implicit num: Numeric[B]): B
- Definition Classes
- IterableOnceOps
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def take(n: Int): Iterator[Int]
- Definition Classes
- Iterator → IterableOnceOps
- def takeWhile(p: (Int) => Boolean): Iterator[Int]
- Definition Classes
- Iterator → IterableOnceOps
- def tapEach[U](f: (Int) => U): Iterator[Int]
- Definition Classes
- Iterator → IterableOnceOps
- def to[C1](factory: Factory[Int, C1]): C1
- Definition Classes
- IterableOnceOps
- def toArray: Array[Int]
- Note
This method, as well as the generic
toArray
should be overwritten when the size is known.
- def toArray[B >: Int](implicit arg0: ClassTag[B]): Array[B]
- Definition Classes
- IterableOnceOps
- final def toBuffer[B >: Int]: Buffer[B]
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- def toIndexedSeq: IndexedSeq[Int]
- Definition Classes
- IterableOnceOps
- def toList: List[Int]
- Definition Classes
- IntIterator → IterableOnceOps
- def toMap[K, V](implicit ev: <:<[Int, (K, V)]): Map[K, V]
- Definition Classes
- IterableOnceOps
- def toSeq: Seq[Int]
- Definition Classes
- IterableOnceOps
- def toSet: IntTrieSet
- def toSet[B >: Int]: Set[B]
- Definition Classes
- IterableOnceOps
- def toSortedSet: IntArraySet
- Note
This method should be overwritten, when the underlying collection is already sorted.
- def toString(): String
- Definition Classes
- Iterator → AnyRef → Any
- def toVector: Vector[Int]
- Definition Classes
- IterableOnceOps
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def withFilter(p: (Int) => Boolean): IntIterator
- Definition Classes
- IntIterator → Iterator
- def zip[B](that: IterableOnce[B]): Iterator[(Int, B)]
- Definition Classes
- Iterator
- def zipAll[A1 >: Int, B](that: IterableOnce[B], thisElem: A1, thatElem: B): Iterator[(A1, B)]
- Definition Classes
- Iterator
- def zipWithIndex: Iterator[(Int, Int)]
- Definition Classes
- Iterator → IterableOnceOps
Deprecated Value Members
- final def /:[B](z: B)(op: (B, Int) => B): B
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use foldLeft instead of /:
- final def :\[B](z: B)(op: (Int, B) => B): B
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use foldRight instead of :\
- def aggregate[B](z: => B)(seqop: (B, Int) => B, combop: (B, B) => B): B
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0)
aggregate
is not relevant for sequential collections. UsefoldLeft(z)(seqop)
instead.
- final def copyToBuffer[B >: Int](dest: Buffer[B]): Unit
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use
dest ++= coll
instead
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
- final def hasDefiniteSize: Boolean
- Definition Classes
- Iterator → IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) hasDefiniteSize on Iterator is the same as isEmpty
- def scanRight[B](z: B)(op: (Int, B) => B): Iterator[B]
- Definition Classes
- Iterator
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Call scanRight on an Iterable instead.
- def seq: IntIterator.this.type
- Definition Classes
- Iterator
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Iterator.seq always returns the iterator itself
- final def toIterator: Iterator[Int]
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use .iterator instead of .toIterator
- final def toStream: Stream[Int]
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use .to(LazyList) instead of .toStream