summaryrefslogtreecommitdiff
path: root/src/library/scalax/collection/BufferedIterator.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scalax/collection/BufferedIterator.scala')
-rwxr-xr-xsrc/library/scalax/collection/BufferedIterator.scala27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/library/scalax/collection/BufferedIterator.scala b/src/library/scalax/collection/BufferedIterator.scala
new file mode 100755
index 0000000000..07509c2758
--- /dev/null
+++ b/src/library/scalax/collection/BufferedIterator.scala
@@ -0,0 +1,27 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2003-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id: BufferedIterator.scala 12641 2007-08-22 16:01:57Z mcdirmid $
+
+
+package scalax.collection
+
+/** Buffered iterators are iterators which allow to inspect the next
+ * element without discarding it.
+ *
+ * @author Martin Odersky
+ * @version 2.8
+ */
+trait BufferedIterator[+A] extends Iterator[A] {
+
+ /** Returns current element of iterator without advancing beyond it.
+ */
+ def head: A
+
+ override def buffered: this.type = this
+}