blob: 0ff57ee366e31749b05650d0ec4ac64c0501e17c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2009, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
// $Id$
package scala.collection.mutable
import scala.collection.generic.SetProxyTemplate
/** This is a simple wrapper class for <a href="Set.html"
* target="contentFrame"><code>scala.collection.mutable.Set</code></a>.
* It is most useful for assembling customized set abstractions
* dynamically using object composition and forwarding.
*
* @author Matthias Zenger
* @version 1.1, 09/05/2004
*/
trait SetProxy[A] extends Set[A] with SetProxyTemplate[A, Set[A]]
{
override def thisCollection = this
override def empty = new SetProxy[A] { val self = SetProxy.this.self.empty }
override def + (elem: A) = { self += elem ; this }
override def - (elem: A) = { self -= elem ; this }
def +=(elem: A) = { self += elem; this }
def -=(elem: A) = { self -= elem; this }
}
|