summaryrefslogtreecommitdiff
path: root/src/library/scalax/collection/immutable/Iterable.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scalax/collection/immutable/Iterable.scala')
-rw-r--r--src/library/scalax/collection/immutable/Iterable.scala22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/library/scalax/collection/immutable/Iterable.scala b/src/library/scalax/collection/immutable/Iterable.scala
new file mode 100644
index 0000000000..c299518d1b
--- /dev/null
+++ b/src/library/scalax/collection/immutable/Iterable.scala
@@ -0,0 +1,22 @@
+package scalax.collection.immutable
+
+import generic.covariant
+
+/** 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]
+
+object Iterable extends covariant.IterableFactory[Iterable] {
+ val empty: Iterable[Nothing] = Nil
+}
+
+