summaryrefslogtreecommitdiff
path: root/src/library/scala/Product.scala
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2009-05-27 19:35:02 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2009-05-27 19:35:02 +0000
commitcc5e79c9ec9cea8d0f22020b528877d8f6e00153 (patch)
tree94e43f77c7b7271b3d0b6f9fb7372ae83b39360d /src/library/scala/Product.scala
parent4b8be5d8bec86358276407d6521c41702ccda835 (diff)
downloadscala-cc5e79c9ec9cea8d0f22020b528877d8f6e00153.tar.gz
scala-cc5e79c9ec9cea8d0f22020b528877d8f6e00153.tar.bz2
scala-cc5e79c9ec9cea8d0f22020b528877d8f6e00153.zip
In "Iterable" and in all its subclasses, "itera...
In "Iterable" and in all its subclasses, "iterator" replaces "elements" (and assorted changes).
Diffstat (limited to 'src/library/scala/Product.scala')
-rw-r--r--src/library/scala/Product.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/library/scala/Product.scala b/src/library/scala/Product.scala
index fd310f8fcf..b9a60e4c95 100644
--- a/src/library/scala/Product.scala
+++ b/src/library/scala/Product.scala
@@ -32,13 +32,17 @@ trait Product extends AnyRef {
*/
def productArity: Int
- def productElements: Iterator[Any] = new Iterator[Any] {
+ def productIterator: Iterator[Any] = new Iterator[Any] {
private var c: Int = 0
private val cmax = productArity
def hasNext = c < cmax
def next() = { val result = productElement(c); c += 1; result }
}
+ /** @deprecated use productIterator instead
+ */
+ @deprecated def productElements: Iterator[Any] = productIterator
+
/**
* By default the empty string. Implementations may override this
* method in order to prepend a string prefix to the result of the