diff options
author | Martin Odersky <odersky@gmail.com> | 2009-05-08 16:33:15 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2009-05-08 16:33:15 +0000 |
commit | 14a631a5fec42d04d0723355a0b93e482b5e4662 (patch) | |
tree | f639c2a22e89e193b9abea391993ecfd4d5326ee /src/library/scala/collection/BufferedIterator.scala | |
parent | 2379eb4ebbd28c8892b50a1d9fa8a687099eea4d (diff) | |
download | scala-14a631a5fec42d04d0723355a0b93e482b5e4662.tar.gz scala-14a631a5fec42d04d0723355a0b93e482b5e4662.tar.bz2 scala-14a631a5fec42d04d0723355a0b93e482b5e4662.zip |
massive new collections checkin.
Diffstat (limited to 'src/library/scala/collection/BufferedIterator.scala')
-rwxr-xr-x | src/library/scala/collection/BufferedIterator.scala | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/library/scala/collection/BufferedIterator.scala b/src/library/scala/collection/BufferedIterator.scala new file mode 100755 index 0000000000..f990cb8748 --- /dev/null +++ b/src/library/scala/collection/BufferedIterator.scala @@ -0,0 +1,27 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2003-2009, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + +// $Id: BufferedIterator.scala 12641 2007-08-22 16:01:57Z mcdirmid $ + + +package scala.collection + +/** Buffered iterators are iterators which provide a method `head` that inspects 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 +} |