in scala/collection/mutable
trait Set

trait Set[A]()
extends Object
with ScalaObject
with Set[A]
with Scriptable[Message[A]]
with Cloneable
Implementing classes or objects:
class SetProxy[A](set: Set[A])
class HashSet[A]()
trait SynchronizedSet[A]()
class JavaSetAdaptor[A](jset: java.util.Set)
class ImmutableSetAdaptor[A](s: Set[A])
class ObservableSet[A,This <: ObservableSet[A,This]]()

This trait represents mutable sets. Concrete set implementations just have to provide functionality for the abstract methods in scala.collection.Set as well as for add, remove, and clear.
Author:
Matthias Zenger
Version:
1.1, 09/05/2004

Method Summary
  def ++=(that: Iterable[A]): Unit
     This method will add all the elements provided by an iterator of the iterable object that to the set.
  def ++=(it: Iterator[A]): Unit
     This method will add all the elements provided by an iterator of the iterable object that to the set.
abstract def +=(elem: A): Unit
     This method adds a new element to the set.
  def --=(that: Iterable[A]): Unit
     This method removes all the elements provided by the the iterable object that from the set.
  def --=(it: Iterator[A]): Unit
     This method removes all the elements provided by an iterator it from the set.
abstract def -=(elem: A): Unit
     -= can be used to remove a single element from a set.
  def <<(cmd: Message[A]): Unit
     Send a message to this scriptable object.
abstract def clear: Unit
     Removes all elements from the set.
override def clone(): Set[A]
     Return a clone of this set.
  def excl(elems: A*): Unit
     excl removes many elements from the set.
  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 hashCode(): Int
     The hashCode method always yields an error, since it is not safe to use mutable stacks as keys in hash tables.
  def incl(elems: A*): Unit
     incl can be used to add many elements to the set at the same time.
  def intersect(that: Set[A]): Unit
     This method computes an intersection with set that.
  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, foreach, sameElements

Methods inherited from scala/collection/Set-class
apply, contains, equals, isEmpty, size, subsetOf, toList, toString

Method Detail

update

  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

+=

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

++=

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

++=

  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

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

-=

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

--=

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

--=

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

excl

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

intersect

  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.

filter

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

clear

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

<<

  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.

hashCode

  override def hashCode(): Int
The hashCode method always yields an error, since it is not safe to use mutable stacks as keys in hash tables.
Returns:
never.