summaryrefslogtreecommitdiff
path: root/src/library/scalax/collection/Iterator.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2009-02-13 11:59:49 +0000
committerMartin Odersky <odersky@gmail.com>2009-02-13 11:59:49 +0000
commit04840e2ed4530df9a5ca59b984bf2b37a976dc70 (patch)
tree61394762e202f8ab60e0d3a8e8ac688404241bc3 /src/library/scalax/collection/Iterator.scala
parent708baf94764e2a839e24ca6204060a8d0664d88c (diff)
downloadscala-04840e2ed4530df9a5ca59b984bf2b37a976dc70.tar.gz
scala-04840e2ed4530df9a5ca59b984bf2b37a976dc70.tar.bz2
scala-04840e2ed4530df9a5ca59b984bf2b37a976dc70.zip
new version of collection libraries
Diffstat (limited to 'src/library/scalax/collection/Iterator.scala')
-rwxr-xr-xsrc/library/scalax/collection/Iterator.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library/scalax/collection/Iterator.scala b/src/library/scalax/collection/Iterator.scala
index b858c91d2c..48eda407aa 100755
--- a/src/library/scalax/collection/Iterator.scala
+++ b/src/library/scalax/collection/Iterator.scala
@@ -29,15 +29,15 @@ object Iterator {
}
/**
- * @param x the element
+ * @param elem the element
* @return the iterator with one single element
* @note Equivalent, but more efficient than Iterator(x)
*/
- def single[A](x: A) = new Iterator[A] {
+ def single[A](elem: A) = new Iterator[A] {
private var hasnext = true
def hasNext: Boolean = hasnext
def next(): A =
- if (hasnext) { hasnext = false; x }
+ if (hasnext) { hasnext = false; elem }
else empty.next()
}
@@ -173,7 +173,7 @@ object Iterator {
implicit def iteratorIteratorWrapper[A](its: Iterator[Iterator[A]]): IteratorIteratorOps[A] =
new IteratorIteratorOps[A](its)
- /** @deprecated use `xs.elements` instead
+ /** @deprecated use `xs.elements`, or `Iterator(x1, ..., xn)` instead
*/
@deprecated def fromValues[a](xs: a*) = xs.elements