diff options
author | Paul Phillips <paulp@improving.org> | 2009-05-26 20:55:24 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-05-26 20:55:24 +0000 |
commit | 9ed3fc1dbd90ae93b5bd7abe010a42196e5dee69 (patch) | |
tree | 4c57ede7a8fc69adb170f1599ed3c29481777fab /src/library/scala/collection/generic/MutableSetTemplate.scala | |
parent | d03ffa84665da17c908bd381998b559548500b83 (diff) | |
download | scala-9ed3fc1dbd90ae93b5bd7abe010a42196e5dee69.tar.gz scala-9ed3fc1dbd90ae93b5bd7abe010a42196e5dee69.tar.bz2 scala-9ed3fc1dbd90ae93b5bd7abe010a42196e5dee69.zip |
Moved the script related classes from scala.col...
Moved the script related classes from scala.collection.mutable to
scala.collection.script and reintegrated the Scriptable trait.
Diffstat (limited to 'src/library/scala/collection/generic/MutableSetTemplate.scala')
-rw-r--r-- | src/library/scala/collection/generic/MutableSetTemplate.scala | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/library/scala/collection/generic/MutableSetTemplate.scala b/src/library/scala/collection/generic/MutableSetTemplate.scala index 0a3840cd3e..f24100b81e 100644 --- a/src/library/scala/collection/generic/MutableSetTemplate.scala +++ b/src/library/scala/collection/generic/MutableSetTemplate.scala @@ -11,6 +11,8 @@ package scala.collection.generic +import script._ + /** A generic template for mutable sets of elements of type A. * To implement a concrete mutable set, you need to provide implementations of the following methods: * @@ -29,6 +31,7 @@ package scala.collection.generic */ trait MutableSetTemplate[A, +This <: MutableSetTemplate[A, This] with mutable.Set[A]] extends SetTemplate[A, This] + with Scriptable[A] with Builder[A, This] with Growable[A] with Shrinkable[A] @@ -196,14 +199,14 @@ trait MutableSetTemplate[A, +This <: MutableSetTemplate[A, This] with mutable.Se * @param cmd the message to send. * @throws <code>Predef.UnsupportedOperationException</code> * if the message was not understood. + */ def <<(cmd: Message[A]): Unit = cmd match { - case Include(elem) => this += elem - case Remove(elem) => this -= elem - case Reset() => clear - case s: Script[_] => s.elements foreach << - case _ => throw new UnsupportedOperationException("message " + cmd + " not understood") - } - */ + case Include(_, x) => this += x + case Remove(_, x) => this -= x + case Reset => clear + case s: Script[_] => s.elements foreach << + case _ => throw new UnsupportedOperationException("message " + cmd + " not understood") + } } |