IterableOnce

scala.collection.IterableOnce
See theIterableOnce companion object
trait IterableOnce[+A]

A template trait for collections which can be traversed either once only or one or more times.

Note: IterableOnce does not extend IterableOnceOps. This is different than the general design of the collections library, which uses the following pattern:

trait Seq extends Iterable with SeqOps
trait SeqOps extends IterableOps

trait IndexedSeq extends Seq with IndexedSeqOps
trait IndexedSeqOps extends SeqOps

The goal is to provide a minimal interface without any sequential operations. This allows third-party extension like Scala parallel collections to integrate at the level of IterableOnce without inheriting unwanted implementations.

Attributes

Companion
object
Source
IterableOnce.scala
Graph
Supertypes
class Any
Known subtypes
trait Iterable[A]
trait Iterable[A]
trait Map[K, V]
class AbstractMap[K, V]
class HashMap[K, V]
class IntMap[T]
class ListMap[K, V]
class LongMap[T]
class Map1[K, V]
class Map2[K, V]
class Map3[K, V]
class Map4[K, V]
class WithDefault[K, V]
class WithDefault[K, V]
class TreeMap[K, V]
class TreeSeqMap[K, V]
class VectorMap[K, V]
trait SeqMap[K, V]
trait SortedMap[K, V]
trait Seq[A]
class AbstractSeq[A]
class ArraySeq[A]
class ofBoolean
class ofByte
class ofChar
class ofDouble
class ofFloat
class ofInt
class ofLong
class ofRef[T]
class ofShort
class ofUnit
class LazyList[A]
class List[A]
class ::[A]
object Nil
class NumericRange[T]
class Exclusive[T]
class Inclusive[T]
class Queue[A]
class Range
class Exclusive
class Inclusive
class Stream[A]
class Cons[A]
object Empty
class Vector[A]
trait IndexedSeq[A]
trait LinearSeq[A]
trait Set[A]
class AbstractSet[A]
class BitSet
class BitSet1
class BitSet2
class BitSetN
class HashSet[A]
class ListSet[A]
class Set1[A]
class Set2[A]
class Set3[A]
class Set4[A]
class TreeSet[A]
class ValueSet
trait SortedSet[A]
trait Iterable[A]
class AbstractIterable[A]
class PriorityQueue[A]
trait Map[K, V]
trait Map[K, V]
class TrieMap[K, V]
class AbstractMap[K, V]
class AnyRefMap[K, V]
class CollisionProofHashMap[K, V]
class HashMap[K, V]
class LinkedHashMap[K, V]
class ListMap[K, V]
class LongMap[V]
class WithDefault[K, V]
class WithDefault[K, V]
class OpenHashMap[Key, Value]
class TreeMap[K, V]
trait MultiMap[K, V]
trait SeqMap[K, V]
trait SortedMap[K, V]
trait Seq[A]
class AbstractSeq[A]
class AbstractBuffer[A]
class ArrayBuffer[A]
class ArrayDeque[A]
class Queue[A]
class Stack[A]
class ListBuffer[A]
class UnrolledBuffer[T]
class ArraySeq[T]
class ofBoolean
class ofByte
class ofChar
class ofDouble
class ofFloat
class ofInt
class ofLong
class ofRef[T]
class ofShort
class ofUnit
trait Buffer[A]
trait IndexedBuffer[A]
trait IndexedSeq[T]
class Accumulator[A, CC, C]
class AnyAccumulator[A]
trait Set[A]
class AbstractSet[A]
class BitSet
class HashSet[A]
class LinkedHashSet[A]
class TreeSet[A]
trait SortedSet[A]
class AbstractIterable[A]
class AbstractMap[K, V]
class AbstractSeq[A]
class AbstractSet[A]
class AbstractView[A]
class AbstractMapView[K, V]
class Filter[K, V]
class FilterKeys[K, V]
class Id[K, V]
class MapValues[K, V, W]
class TapEach[K, V, U]
class AbstractSeqView[A]
class ArrayBufferView[A]
class Slice[A]
class StringView
class Id[A]
class Id[A]
class Reverse[A]
class Reverse[A]
class Appended[A]
class Appended[A]
class Appended[A]
class Collect[A, B]
class Concat[A]
class Concat[A]
class Concat[A]
class DistinctBy[A, B]
class Drop[A]
class Drop[A]
class Drop[A]
class DropRight[A]
class DropRight[A]
class DropRight[A]
class DropWhile[A]
class Elems[A]
object Empty
class Fill[A]
class Filter[A]
class FlatMap[A, B]
class Iterate[A]
class LeftPartitionMapped[A, A1, A2]
class Map[A, B]
class Map[A, B]
class Map[A, B]
class PadTo[A]
class Prepended[A]
class Prepended[A]
class Prepended[A]
class RightPartitionMapped[A, A1, A2]
class ScanLeft[A, B]
class Single[A]
class Tabulate[A]
class Take[A]
class Take[A]
class Take[A]
class TakeRight[A]
class TakeRight[A]
class TakeRight[A]
class TakeWhile[A]
class Unfold[A, S]
class Updated[A]
class Zip[A, B]
class ZipAll[A, B]
class ZipWithIndex[A]
trait Map[K, V]
trait DefaultMap[K, V]
trait SeqMap[K, V]
trait SortedMap[K, V]
trait Seq[A]
trait IndexedSeq[A]
trait LinearSeq[A]
trait Set[A]
trait SortedSet[A]
trait BitSet
trait View[A]
trait MapView[K, V]
trait SeqView[A]
trait IndexedSeqView[A]
class Sorted[A, B]
trait IterableOps[A, CC, C]
trait MapOps[K, V, CC, C]
trait SortedMapOps[K, V, CC, C]
trait StrictOptimizedSortedMapOps[K, V, CC, C]
trait StrictOptimizedMapOps[K, V, CC, C]
trait MapOps[K, V, CC, C]
trait SortedMapOps[K, V, CC, C]
trait SetOps[A, CC, C]
trait SortedSetOps[A, CC, C]
trait MapFactoryDefaults[K, V, CC, WithFilterCC]
class WeakHashMap[K, V]
trait MapOps[K, V, CC, C]
trait SortedMapFactoryDefaults[K, V, CC, WithFilterCC, UnsortedCC]
trait SortedMapOps[K, V, CC, C]
trait StrictOptimizedSortedMapOps[K, V, CC, C]
trait StrictOptimizedMapOps[K, V, CC, C]
trait SeqOps[A, CC, C]
trait SeqOps[A, CC, C]
trait IndexedSeqOps[A, CC, C]
trait LinearSeqOps[A, CC, C]
trait StrictOptimizedSeqOps[A, CC, C]
trait SeqOps[A, CC, C]
trait IndexedSeqOps[A, CC, C]
trait IndexedSeqOps[A, CC, C]
trait LinearSeqOps[A, CC, C]
trait StrictOptimizedLinearSeqOps[A, CC, C]
trait StrictOptimizedSeqOps[A, CC, C]
trait ArrayDequeOps[A, CC, C]
trait SetOps[A, CC, C]
trait SetOps[A, CC, C]
trait SortedSetOps[A, CC, C]
trait StrictOptimizedSortedSetOps[A, CC, C]
trait StrictOptimizedSetOps[A, CC, C]
trait SortedSetOps[A, CC, C]
trait BitSetOps[C]
trait SortedSetFactoryDefaults[A, CC, WithFilterCC]
trait StrictOptimizedSortedSetOps[A, CC, C]
trait StrictOptimizedSetOps[A, CC, C]
trait StrictOptimizedIterableOps[A, CC, C]
trait Iterator[A]
class AbstractIterator[A]
class GroupedIterator[B]
class LineIterator
trait BufferedIterator[A]
class Source
class Option[A]
object None
class Some[A]
Show all

Members list

Value members

Abstract methods

def iterator: Iterator[A]

An scala.collection.Iterator over the elements of this collection.

An scala.collection.Iterator over the elements of this collection.

If an IterableOnce object is in fact an scala.collection.Iterator, this method always returns itself, in its current state, but if it is an scala.collection.Iterable, this method always returns a new scala.collection.Iterator.

Attributes

Source
IterableOnce.scala

Concrete methods

def knownSize: Int

The number of elements in this collection, if it can be cheaply computed, -1 otherwise.

The number of elements in this collection, if it can be cheaply computed, -1 otherwise. Cheaply usually means: Not requiring a collection traversal.

Attributes

Source
IterableOnce.scala
def stepper[S <: Stepper[_]](implicit shape: StepperShape[A, S]): S

Returns a scala.collection.Stepper for the elements of this collection.

Returns a scala.collection.Stepper for the elements of this collection.

The Stepper enables creating a Java stream to operate on the collection, see scala.jdk.StreamConverters. For collections holding primitive values, the Stepper can be used as an iterator which doesn't box the elements.

The implicit scala.collection.StepperShape parameter defines the resulting Stepper type according to the element type of this collection.

Note that this method is overridden in subclasses and the return type is refined to S with EfficientSplit, for example scala.collection.IndexedSeqOps.stepper. For Steppers marked with scala.collection.Stepper.EfficientSplit, the converters in scala.jdk.StreamConverters allow creating parallel streams, whereas bare Steppers can be converted only to sequential streams.

Attributes

Source
IterableOnce.scala

Deprecated methods

def /:[B](z: B)(op: (B, A) => B): B
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def :\[B](z: B)(op: (A, B) => B): B
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def collectFirst[B](f: PartialFunction[A, B]): Option[B]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def copyToBuffer(dest: Buffer[A]): Unit
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def count(f: A => Boolean): Int
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def exists(f: A => Boolean): Boolean
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def filter(f: A => Boolean): Iterator[A]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def find(p: A => Boolean): Option[A]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def flatMap[B](f: A => IterableOnce[B]): IterableOnce[B]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def fold[A1 >: A](z: A1)(op: (A1, A1) => A1): A1
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def foldLeft[B](z: B)(op: (B, A) => B): B
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def foldRight[B](z: B)(op: (A, B) => B): B
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def forall(f: A => Boolean): Boolean
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def foreach[U](f: A => U): Unit
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def map[B](f: A => B): IterableOnce[B]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def max(implicit ord: Ordering[A]): A
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def maxBy[B](f: A => B)(implicit cmp: Ordering[B]): A
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def min(implicit ord: Ordering[A]): A
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def minBy[B](f: A => B)(implicit cmp: Ordering[B]): A
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def mkString(start: String, sep: String, end: String): String
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def mkString(sep: String): String
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def product(implicit num: Numeric[A]): A
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def reduce(f: (A, A) => A): A
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def reduceLeft(f: (A, A) => A): A
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def reduceLeftOption(f: (A, A) => A): Option[A]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def reduceOption(f: (A, A) => A): Option[A]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def reduceRight(f: (A, A) => A): A
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def reduceRightOption(f: (A, A) => A): Option[A]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def sameElements[B >: A](that: IterableOnce[B]): Boolean
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def size: Int
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def sum(implicit num: Numeric[A]): A
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def to[C1](factory: Factory[A, C1]): C1
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def toArray[B >: A : ClassTag]: Array[B]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def toBuffer[B >: A]: Buffer[B]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
final def toIterable: Iterable[A]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def toList: List[A]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def toMap[K, V](implicit ev: A <:< (K, V)): Map[K, V]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def toSeq: Seq[A]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def toSet[B >: A]: Set[B]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def toStream: Stream[A]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
final def toTraversable: Iterable[A]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def toVector: Vector[A]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala
def withFilter(f: A => Boolean): Iterator[A]
Implicitly added by iterableOnceExtensionMethods

Attributes

Deprecated
true
Source
IterableOnce.scala