in scala/collection/mutable
trait SynchronizedSet

trait SynchronizedSet[A]()
extends Set[A]
with ScalaObject

This trait should be used as a mixin. It synchronizes the Set functions of the class into which it is mixed in.
Author:
Matthias Zenger
Version:
1.0, 08/07/2003

Method Summary
override def ++=(that: Iterable[A]): Unit
     This method will add all the elements provided by an iterator of the iterable object that to the set.
override def ++=(it: Iterator[A]): Unit
     This method will add all the elements provided by an iterator of the iterable object that to the set.
override def +=(elem: A): Unit
     This method adds a new element to the set.
override def --=(that: Iterable[A]): Unit
     This method removes all the elements provided by the the iterable object that from the set.
override def --=(it: Iterator[A]): Unit
     This method removes all the elements provided by an iterator it from the set.
override def -=(elem: A): Unit
     -= can be used to remove a single element from a set.
override def <<(cmd: Message[A]): Unit
     Send a message to this scriptable object.
override def clear: Unit
     Removes all elements from the set.
override def clone(): Set[A]
     Return a clone of this set.
override def contains(elem: A): Boolean
     Checks if this set contains element elem.
override def excl(elems: A*): Unit
     excl removes many elements from the set.
override def filter(p: (A) => Boolean): Unit
     Method filter removes all elements from the set for which the predicate p yields the value false.
override def foreach(f: (A) => Unit): Unit
     Apply a function f to all elements of this iterable object.
override def incl(elems: A*): Unit
     incl can be used to add many elements to the set at the same time.
override def intersect(that: Set[A]): Unit
     This method computes an intersection with set that.
override def isEmpty: Boolean
     Checks if this set is empty.
override def size: Int
     Returns the number of elements in this set.
override def subsetOf(that: Set[A]): Boolean
     Checks if this set is a subset of set that.
override def toList: List[A]
     Returns the elements of this set as a list.
override def toString(): String
     Returns a string representation of this set.
override def update(elem: A, included: Boolean): Unit
     This method allows one to add or remove an element elem from this set depending on the value of parameter included.

Methods inherited from java/lang/Object-class
eq, finalize, getClass, notify, notifyAll, synchronized, wait, wait, wait

Methods inherited from scala/Any-class
!=, ==, asInstanceOf, isInstanceOf, match

Methods inherited from scala/Iterable-class
/:, :\, elements, exists, find, foldLeft, foldRight, forall, sameElements

Methods inherited from scala/collection/Set-class
apply, equals

Methods inherited from scala/collection/mutable/Set-class
hashCode

Method Detail

size

  override def size: Int
Returns the number of elements in this set.
Returns:
number of set elements.

isEmpty

  override def isEmpty: Boolean
Checks if this set is empty.
Returns:
true, iff there is no element in the set.

contains

  override def contains(elem: A): Boolean
Checks if this set contains element elem.
Parameters:
elem - the element to check for membership.
Returns:
true, iff elem is contained in this set.

update

  override def update(elem: A, included: Boolean): Unit
This method allows one to add or remove an element elem from this set depending on the value of parameter included. Typically, one would use the following syntax:
set(elem) = true

+=

  override def +=(elem: A): Unit
This method adds a new element to the set.

++=

  override def ++=(that: Iterable[A]): Unit
This method will add all the elements provided by an iterator of the iterable object that to the set.

++=

  override def ++=(it: Iterator[A]): Unit
This method will add all the elements provided by an iterator of the iterable object that to the set.

incl

  override def incl(elems: A*): Unit
incl can be used to add many elements to the set at the same time.

-=

  override def -=(elem: A): Unit
-= can be used to remove a single element from a set.

--=

  override def --=(that: Iterable[A]): Unit
This method removes all the elements provided by the the iterable object that from the set.

--=

  override def --=(it: Iterator[A]): Unit
This method removes all the elements provided by an iterator it from the set.

excl

  override def excl(elems: A*): Unit
excl removes many elements from the set.

intersect

  override def intersect(that: Set[A]): Unit
This method computes an intersection with set that. It removes all the elements that are not present in that.

clear

  override def clear: Unit
Removes all elements from the set. After this operation is completed, the set will be empty.

subsetOf

  override def subsetOf(that: Set[A]): Boolean
Checks if this set is a subset of set that.
Parameters:
that - another set.
Returns:
true, iff the other set is a superset of this set.

foreach

  override def foreach(f: (A) => Unit): Unit
Apply a function f to all elements of this iterable object.
Parameters:
f - a function that is applied to every element.

filter

  override def filter(p: (A) => Boolean): Unit
Method filter removes all elements from the set for which the predicate p yields the value false.

toList

  override def toList: List[A]
Returns the elements of this set as a list.
Returns:
a list containing all set elements.

toString

  override def toString(): String
Returns a string representation of this set.
Returns:
a string showing all elements of this set.

<<

  override def <<(cmd: Message[A]): Unit
Send a message to this scriptable object.
Parameters:
cmd - the message to send.

clone

  override def clone(): Set[A]
Return a clone of this set.
Returns:
a set with the same elements.