diff options
author | Paul Phillips <paulp@improving.org> | 2011-09-19 13:35:16 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-09-19 13:35:16 +0000 |
commit | 5637b22d21ccc1abe70e16e87c1607cd3acb9b3c (patch) | |
tree | f62eb05f94bf22d0091f65002e7fc98cdc04e1ae /src/library/scala/collection/immutable/Stream.scala | |
parent | f7e038361ae6b1958985a20e30bfa567d6a51b16 (diff) | |
download | scala-5637b22d21ccc1abe70e16e87c1607cd3acb9b3c.tar.gz scala-5637b22d21ccc1abe70e16e87c1607cd3acb9b3c.tar.bz2 scala-5637b22d21ccc1abe70e16e87c1607cd3acb9b3c.zip |
Deprecation and convention adherence patrol.
Iterators should have def next(), not def next. Clearing
a mutable structure should be done with clear(), not clear.
And etc. No review.
Diffstat (limited to 'src/library/scala/collection/immutable/Stream.scala')
-rw-r--r-- | src/library/scala/collection/immutable/Stream.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library/scala/collection/immutable/Stream.scala b/src/library/scala/collection/immutable/Stream.scala index fb77ce04a3..7fa973e82f 100644 --- a/src/library/scala/collection/immutable/Stream.scala +++ b/src/library/scala/collection/immutable/Stream.scala @@ -136,7 +136,7 @@ import Stream.cons * val it3 = new Iterator[Int] { * var i = -1 * def hasNext = true - * def next: Int = { i += 1; i } + * def next(): Int = { i += 1; i } * } * loop("Iterator3: ", it3.next, it3) * }}} @@ -933,7 +933,7 @@ final class StreamIterator[+A](self: Stream[A]) extends Iterator[A] { private var these = new LazyCell(self) def hasNext: Boolean = these.v.nonEmpty - def next: A = + def next(): A = if (isEmpty) Iterator.empty.next else { val cur = these.v |