summaryrefslogtreecommitdiff
path: root/src/library/scala/Product.scala
diff options
context:
space:
mode:
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