blob: 74911ec113ba09e1bc4ba1a23059c07c491a08ca (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2009, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
// $Id$
package scala.collection.generic
import collection.mutable.Buffer
// Methods could be printed by cat IterableTemplate.scala | egrep '^ (override )?def'
/** This trait implements a proxy for iterable objects. It forwards
* all calls to a different iterable object
*
* @author Martin Odersky
* @version 2.8
*/
trait IterableProxyTemplate[+A, +This <: IterableTemplate[A, This] with Iterable[A]]
extends IterableTemplate[A, This]
with TraversableProxyTemplate[A, This]
{
override def iterator: Iterator[A] = self.iterator
override def foreach[U](f: A => U): Unit = self.foreach(f)
override def isEmpty: Boolean = self.isEmpty
override def foldRight[B](z: B)(op: (A, B) => B): B = self.foldRight(z)(op)
override def reduceRight[B >: A](op: (A, B) => B): B = self.reduceRight(op)
override def toIterable: Iterable[A] = self.toIterable
override def head: A = self.head
override def takeRight(n: Int): This = self.takeRight(n)
override def dropRight(n: Int): This = self.dropRight(n)
override def sameElements[B >: A](that: Iterable[B]): Boolean = self.sameElements(that)
override def toStream: Stream[A] = self.toStream
override def view = self.view
override def view(from: Int, until: Int) = self.view(from, until)
}
|