scala.collection.generic

trait IterableForwarder

[source: scala/collection/generic/IterableForwarder.scala]

trait IterableForwarder[+A]
extends Iterable[A] with TraversableForwarder[A]

This trait implements a forwarder for iterable objects. It forwards all calls to a different iterable object, except for

The above methods are forwarded by subclass IterableProxy.

Author
Martin Odersky
Version
2.8
Since
2.8
Direct Known Subclasses:
SeqForwarder

Method Summary
override def iterator : Iterator[A]
Creates a new iterator over all elements contained in this iterable object.
override def sameElements [B >: A](that : Iterable[B]) : Boolean
Checks if the other iterable object contains the same elements as this one.
protected abstract def underlying : Iterable[A]
The iterable object to which calls are forwarded
Methods inherited from TraversableForwarder
isEmpty, nonEmpty, hasDefiniteSize, foreach, forall, exists, count, find, foldLeft, foldRight, reduceLeft, reduceRight, reduceLeftOption, reduceRightOption, copyToBuffer, copyToArray, toArray, toList, toSeq, toStream, mkString, addString, head, last, lastOption
Methods inherited from Iterable
companion
Methods inherited from IterableLike
thisCollection, toCollection, elements, toIterable, take, slice, takeWhile, takeRight, dropRight, zip, zipAll, zipWithIndex, canEqual, view, view, first, firstOption, projection
Methods inherited from GenericTraversableTemplate
newBuilder, genericBuilder, unzip, flatten, transpose
Methods inherited from TraversableLike
repr, size, ++, ++, map, flatMap, filter, filterNot, partialMap, remove, partition, groupBy, /:, :\, sum, product, min, max, headOption, tail, init, drop, dropWhile, span, splitAt, copyToArray, toIndexedSeq, toSet, mkString, mkString, addString, addString, toString, stringPrefix, withFilter
Methods inherited from AnyRef
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
protected abstract def underlying : Iterable[A]
The iterable object to which calls are forwarded
Overrides
TraversableForwarder.underlying

override def iterator : Iterator[A]
Creates a new iterator over all elements contained in this iterable object.
Returns
the new iterator

override def sameElements[B >: A](that : Iterable[B]) : Boolean
Checks if the other iterable object contains the same elements as this one.
Notes
will not terminate for infinite-sized iterables.
Might return different results for different runs, unless this iterable is ordered
Parameters
that - the other iterable
Returns
true, iff both iterables contain the same elements in the same order.