summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/immutable/ListSet.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/collection/immutable/ListSet.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/collection/immutable/ListSet.scala')
-rw-r--r--src/library/scala/collection/immutable/ListSet.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/library/scala/collection/immutable/ListSet.scala b/src/library/scala/collection/immutable/ListSet.scala
index 210413171b..8dc961a308 100644
--- a/src/library/scala/collection/immutable/ListSet.scala
+++ b/src/library/scala/collection/immutable/ListSet.scala
@@ -62,7 +62,7 @@ class ListSet[A] extends Set[A]
* @throws Predef.NoSuchElementException
* @return the new iterator
*/
- def elements: Iterator[A] = new Iterator[A] {
+ def iterator: Iterator[A] = new Iterator[A] {
var that: ListSet[A] = self;
def hasNext = !that.isEmpty;
def next: A =
@@ -70,6 +70,8 @@ class ListSet[A] extends Set[A]
else { val res = that.elem; that = that.next; res }
}
+ @deprecated def elements = iterator
+
/**
* @throws Predef.NoSuchElementException
*/