scala.collection.mutable
trait SynchronizedSet

[source: `scala/collection/mutable/SynchronizedSet.scala`]

`` `trait` SynchronizedSet[A]
  `extends` Set[A]

  This class 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 Add all the elements provided by an iterator of the iterable object `that` to the set.
`override def` | ++= (it : Iterator[A]) : Unit Add all the elements provided by an iterator `elems` to the set.
`def` | += (elem : A) : Unit Add a new element to the set.
`override def` | --= (it : Iterator[A]) : Unit Remove all the elements provided by an iterator `elems` from the set.
`override def` | --= (that : Iterable[A]) : Unit Remove all the elements provided by an iterator of the iterable object `elems` from the set.
`def` | -= (elem : A) : Unit Removes a single element from a set.
`override def` | << (cmd : Message[A]) : Unit Send a message to this scriptable object.
`def` | clear : Unit Removes all elements from the set. After this operation is completed, the set will be empty.
`override def` | clone : Set[A] Return a clone of this set.
`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` | 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`. It removes all the elements that are not present in `that`.
`override def` | isEmpty : Boolean Checks if this set is empty.
`override def` | retain (p : (A) => Boolean) : Unit Method `retain removes all elements from the set for which the predicate `p` yields the value `false`.`
`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] Create a fresh list with all the elements of this iterable object.
`override def` | toString : String
`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

Methods inherited from Set
+=, +, +, ++, ++, -=, -, -, --, --, readOnly

Methods inherited from Set
apply, equals, hashCode, toArray

Methods inherited from Collection
stringPrefix

Methods inherited from Iterable
elements (abstract), concat, ++, map, flatMap, filter, takeWhile, dropWhile, take, drop, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toStream, mkString, mkString, mkString, addString, addString, copyToArray, projection, hasDefiniteSize

Methods inherited from Function1
compose, andThen

Methods inherited from AnyRef
getClass, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized

Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf

Method Details

`` `def` size : Int

  Returns the number of elements in this set.

Returns
  number of set elements.

`override` `def` isEmpty : Boolean

  Checks if this set is empty.

Returns
  `true` iff there is no element in the set.

`` `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.

`` `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

Overrides
  Set.update

`` `def` +=(elem : A) : Unit

  Add a new element to the set.

Parameters
  `elem -` the element to be added

Overrides
  Set.+=

`override` `def` ++=(that : Iterable[A]) : Unit

  Add all the elements provided by an iterator of the iterable object `that` to the set.

Parameters
  `elems -` the iterable object containing the elements to be added

Overrides
  Set.++=

`override` `def` ++=(it : Iterator[A]) : Unit

  Add all the elements provided by an iterator `elems` to the set.

Parameters
  `elems -` the iterator containing the elements to be added

Overrides
  Set.++=

`override` `def` incl(elems : A*) : Unit

  `incl` can be used to add many elements to the set at the same time.

Deprecated
  use `++=` instead

Overrides
  Set.incl

`` `def` -=(elem : A) : Unit

  Removes a single element from a set.

Parameters
  `elem -` The element to be removed.

Overrides
  Set.-=

`override` `def` --=(that : Iterable[A]) : Unit

  Remove all the elements provided by an iterator of the iterable object `elems` from the set.

Overrides
  Set.--=

`override` `def` --=(it : Iterator[A]) : Unit

  Remove all the elements provided by an iterator `elems` from the set.

Overrides
  Set.--=

`override` `def` excl(elems : A*) : Unit

  `excl` removes many elements from the set.

Overrides
  Set.excl

`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`.

Parameters
  `that -` the set to intersect with.

Overrides
  Set.intersect

`` `def` clear : Unit

  Removes all elements from the set. After this operation is completed, the set will be empty.

Overrides
  Set.clear

`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. todo: rename to isSubsetOf

`override` `def` foreach(f : (A) => Unit) : Unit

  Apply a function `f` to all elements of this iterable object.

Notes
  Will not terminate for infinite-sized collections.
Parameters
  `f -` a function that is applied to every element.

`override` `def` retain(p : (A) => Boolean) : Unit

  Method `retain removes all elements from the set for which the predicate `p` yields the value `false`.`

Overrides
  Set.retain

`override` `def` toList : List[A]

  Create a fresh list with all the elements of this iterable object.

Notes
  Will not terminate for infinite-sized collections.

`override` `def` toString : String

`override` `def` <<(cmd : Message[A]) : Unit

  Send a message to this scriptable object.

Parameters
  `cmd -` the message to send.
Throws
  `<code>Predef.UnsupportedOperationException</code> -` if the message was not understood.

Overrides
  Set.<<

`override` `def` clone : Set[A]

  Return a clone of this set.

Returns
  a set with the same elements.

Overrides
  Set.clone