diff options
Diffstat (limited to 'src/library/scalax/collection/mutable/Iterable.scala')
-rwxr-xr-x | src/library/scalax/collection/mutable/Iterable.scala | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/library/scalax/collection/mutable/Iterable.scala b/src/library/scalax/collection/mutable/Iterable.scala new file mode 100755 index 0000000000..0872c3c549 --- /dev/null +++ b/src/library/scalax/collection/mutable/Iterable.scala @@ -0,0 +1,32 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2003-2008, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + +// $Id: Iterable.scala 15188 2008-05-24 15:01:02Z stepancheg $ + +package scalax.collection.mutable + +import generic._ + +/** Collection classes mixing in this class provide a method + * <code>elements</code> which returns an iterator over all the + * elements contained in the collection. + * + * @note If a collection has a known <code>size</code>, it should also sub-type <code>SizedIterable</code>. + * + * @author Matthias Zenger + * @autor Martin Odersky + * @owner Martin Odersky + * @version 2.8 + */ +trait Iterable[A] extends collection.Iterable[A] with IterableTemplate[Iterable, A] + +/* Factory object for `Iterable` class */ +object Iterable extends IterableFactory[Iterable] { + /** The empty iterable */ + def apply[A](args: A*): Iterable[A] = ArrayBuffer.apply(args: _*) // !!! swicth to Array? +} |