summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorstenman <stenman@epfl.ch>2003-07-09 15:16:44 +0000
committerstenman <stenman@epfl.ch>2003-07-09 15:16:44 +0000
commit05350a4a9d95eabca3c3f6fe17e8c0b79e37a6bd (patch)
treecdc8533778122db2db212d92ac92f95b887e1cc8 /sources
parent209dd1ab443385ffd71b9ecb5d31f3981e6541be (diff)
downloadscala-05350a4a9d95eabca3c3f6fe17e8c0b79e37a6bd.tar.gz
scala-05350a4a9d95eabca3c3f6fe17e8c0b79e37a6bd.tar.bz2
scala-05350a4a9d95eabca3c3f6fe17e8c0b79e37a6bd.zip
Deleted deprecated at()
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/collection/immutable/Queue.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/sources/scala/collection/immutable/Queue.scala b/sources/scala/collection/immutable/Queue.scala
index 1df8b73251..b46b73012d 100644
--- a/sources/scala/collection/immutable/Queue.scala
+++ b/sources/scala/collection/immutable/Queue.scala
@@ -27,7 +27,9 @@ class Queue[+A](in:List[A],out:List[A]) extends Seq[A] {
* @return the element at position <code>n</code> in this list.
* @throws java.lang.RuntimeException if the list is too short.
*/
- def apply(n: Int): A = at(n);
+ def apply(n: Int): A =
+ if (n < out.length) out.apply(n)
+ else (in.reverse).apply(n - out.length);
/** Returns the elements in the list as an iterator
*/