summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstepancheg <stepancheg@epfl.ch>2008-06-14 14:36:23 +0000
committerstepancheg <stepancheg@epfl.ch>2008-06-14 14:36:23 +0000
commita735240eddfd68963f33f4c0d9139c2f1f210b47 (patch)
tree3728793aa4474fc172759bb4bca2e71b158e0bd5
parent70ead2ee53c24d199a9156637b3dd5f44e00298f (diff)
downloadscala-a735240eddfd68963f33f4c0d9139c2f1f210b47.tar.gz
scala-a735240eddfd68963f33f4c0d9139c2f1f210b47.tar.bz2
scala-a735240eddfd68963f33f4c0d9139c2f1f210b47.zip
Change iterator "next" method signatures from "...
Change iterator "next" method signatures from "next" to "next()"
-rw-r--r--src/library/scala/Iterator.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library/scala/Iterator.scala b/src/library/scala/Iterator.scala
index 517664cdfc..8d5c04f329 100644
--- a/src/library/scala/Iterator.scala
+++ b/src/library/scala/Iterator.scala
@@ -62,7 +62,7 @@ object Iterator {
private var i = start
val end = if (start + length < xs.length) start + length else xs.length
override def hasNext: Boolean = i < end
- def next: a =
+ def next(): a =
if (hasNext) { val x = xs(i) ; i += 1 ; x }
else throw new NoSuchElementException("next on empty iterator")
@@ -189,7 +189,7 @@ object Iterator {
def from(start: Int, step: Int => Int): Iterator[Int] = new Iterator[Int] {
private var i = start
override def hasNext: Boolean = true
- def next: Int = { val j = i; i = step(i); j }
+ def next(): Int = { val j = i; i = step(i); j }
}
}
@@ -582,7 +582,7 @@ trait Iterator[+A] {
private var cnt = -1
def count = cnt
def hasNext: Boolean = Iterator.this.hasNext
- def next: A = { cnt += 1; Iterator.this.next }
+ def next(): A = { cnt += 1; Iterator.this.next }
}
/** Creates two new iterators that both iterate over the same elements
@@ -599,7 +599,7 @@ trait Iterator[+A] {
((this == ahead) && Iterator.this.hasNext) ||
((this != ahead) && (!xs.isEmpty || !ys.isEmpty || Iterator.this.hasNext))
)
- def next: A = Iterator.this.synchronized {
+ def next(): A = Iterator.this.synchronized {
if (this == ahead) {
val e = Iterator.this.next
xs = e :: xs; e