scala

trait IterableProxy

[source: scala/IterableProxy.scala]

trait IterableProxy[+A]
extends Iterable[A] with Proxy
This class implements a proxy for iterable objects. It forwards all calls to a different iterable object.
Author
Matthias Zenger
Martin Odersky
Version
2.0, 31/12/2006
Direct Known Subclasses:
CollectionProxy, SeqProxy, MapProxy, SetProxy

Method Summary
override def /: [B](z : B)(op : (B, A) => B) : B
Similar to foldLeft but can be used as an operator with the order of list and zero arguments reversed. That is, z /: xs is the same as xs foldLeft z
override def :\ [B](z : B)(op : (A, B) => B) : B
An alias for foldRight. That is, xs :\ z is the same as xs foldRight z
override def addString (buf : StringBuilder, start : String, sep : String, end : String) : StringBuilder
Write all elements of this string into given string builder.
override def concat [B >: A](that : Iterable[B]) : Collection[B]
Appends two iterable objects.
override def copyToBuffer [B >: A](dest : Buffer[B]) : Unit
Copy all elements to a given buffer
override def drop (n : Int) : Collection[A]
Returns this iterable without its n first elements If this iterable has less than n elements, the empty iterable is returned.
override def dropWhile (p : (A) => Boolean) : Collection[A]
Returns the longest suffix of this iterable whose first element does not satisfy the predicate p.
override def elements : Iterator[A]
Creates a new iterator over all elements contained in this object.
override def exists (p : (A) => Boolean) : Boolean
Apply a predicate p to all elements of this iterable object and return true, iff there is at least one element for which p yields true.
override def filter (p : (A) => Boolean) : Iterable[A]
Returns all the elements of this iterable that satisfy the predicate p. The order of the elements is preserved.
override def find (p : (A) => Boolean) : Option[A]
Find and return the first element of the iterable object satisfying a predicate, if any.
override def findIndexOf (p : (A) => Boolean) : Int
Returns index of the first element satisying a predicate, or -1.
override def flatMap [B](f : (A) => Iterable[B]) : Iterable[B]
Applies the given function f to each element of this iterable, then concatenates the results.
override def foldLeft [B](z : B)(op : (B, A) => B) : B
Combines the elements of this iterable object together using the binary function f, from left to right, and starting with the value z.
override def foldRight [B](z : B)(op : (A, B) => B) : B
Combines the elements of this list together using the binary function f, from right to left, and starting with the value z.
override def forall (p : (A) => Boolean) : Boolean
Apply a predicate p to all elements of this iterable object and return true, iff the predicate yields true for all elements.
override def foreach (f : (A) => Unit) : Unit
Apply a function f to all elements of this iterable object.
override def indexOf [B >: A](elem : B) : Int
Returns the index of the first occurence of the specified object in this iterable object.
override def map [B](f : (A) => B) : Iterable[B]
Returns the iterable resulting from applying the given function f to each element of this iterable.
override def mkString (start : String, sep : String, end : String) : String
Returns a string representation of this iterable object. The resulting string begins with the string start and is finished by the string end. Inside, the string representations of elements (w.r.t. the method toString()) are separated by the string sep.
override def reduceLeft [B >: A](op : (B, B) => B) : B
Combines the elements of this iterable object together using the binary operator op, from left to right
override def reduceRight [B >: A](op : (B, B) => B) : B
Combines the elements of this iterable object together using the binary operator op, from right to left
override def sameElements [B >: A](that : Iterable[B]) : Boolean
Checks if the other iterable object contains the same elements.
abstract def self : Iterable[A]
override def take (n : Int) : Collection[A]
Returns an iterable consisting only over the first n elements of this iterable, or else the whole iterable, if it has less than n elements.
override def takeWhile (p : (A) => Boolean) : Iterable[A]
Returns the longest prefix of this iterable whose elements satisfy the predicate p.
override def toList : List[A]
Create a fresh list with all the elements of this iterable object.
Methods inherited from Proxy
hashCode, equals, toString
Methods inherited from Iterable
++, toStream, mkString, mkString, addString, copyToArray, isEmpty, projection, hasDefiniteSize
Methods inherited from AnyRef
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf