diff options
author | Burak Emir <emir@epfl.ch> | 2007-04-12 14:30:11 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2007-04-12 14:30:11 +0000 |
commit | 5bb26aa18d774162828693bb8c4fcc246359ecf5 (patch) | |
tree | 9eb5b85e7452ad334fe209741166726af0bdc2d2 /src/library/scala/Product.scala | |
parent | 34856ebaeccf44adace4dba8c44ba2155e231b83 (diff) | |
download | scala-5bb26aa18d774162828693bb8c4fcc246359ecf5.tar.gz scala-5bb26aa18d774162828693bb8c4fcc246359ecf5.tar.bz2 scala-5bb26aa18d774162828693bb8c4fcc246359ecf5.zip |
renamed arity=>productArity,element=>productEle...
renamed arity=>productArity,element=>productElement
Diffstat (limited to 'src/library/scala/Product.scala')
-rw-r--r-- | src/library/scala/Product.scala | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/library/scala/Product.scala b/src/library/scala/Product.scala index 75ffa84378..96e989284f 100644 --- a/src/library/scala/Product.scala +++ b/src/library/scala/Product.scala @@ -26,11 +26,24 @@ trait Product extends AnyRef { * @throws IndexOutOfBoundsException * @return ... */ - def element(n: Int): Any + def productElement(n: Int): Any = element(n) + + /** for a case class <code>A(x_1,...,x_k))</code>, returns <code>x_(i+1)</code> + * for <code>0 <= i < k</code> + * + * @param n the position of the n-th element + * @throws IndexOutOfBoundsException + * @return ... + */ + @deprecated def element(n: Int): Any /* = productElement(n) */ + + /** return k for a product <code>A(x_1,...,x_k))</code> + */ + def productArity: Int = arity /** return k for a product <code>A(x_1,...,x_k))</code> */ - def arity: Int + @deprecated def arity: Int /* = productElement(n) */ /** * By default the empty string. Implementations may override this |