scala.collection.mutable

trait ObservableSet

[source: scala/collection/mutable/ObservableSet.scala]

trait ObservableSet[A]
extends Set[A] with Publisher[Message[A] with Undoable]
This class is typically used as a mixin. It adds a subscription mechanism to the Set class into which this abstract class is mixed in. Class ObservableSet publishes events of the type Message.
Author
Matthias Zenger
Version
1.0, 08/07/2003
Since
1
Type Summary
abstract type Pub <: ObservableSet[A]
Values and Variables inherited from Publisher
self
Method Summary
def += (elem : A) : ObservableSet[A]
Adds a new element to the set.
def -= (elem : A) : ObservableSet[A]
Removes a single element from a set.
def clear : Unit
Removes all elements from the set. After this operation is completed, the set will be empty.
Methods inherited from Publisher
subscribe, subscribe, suspendSubscription, activateSubscription, removeSubscription, removeSubscriptions, publish, equals
Methods inherited from Set
companion
Methods inherited from SetLike
newBuilder, add, remove, update, retain, clone, result, +, +, ++, ++, -, -, --, --, <<
Methods inherited from Shrinkable
-=, --=, --=
Methods inherited from Builder
sizeHint, mapResult
Methods inherited from Growable
+=, ++=, ++=
Methods inherited from SetLike
contains (abstract), isEmpty, apply, intersect, &, **, union, |, diff, &~, subsetOf, stringPrefix, toString, hashCode
Methods inherited from GenericSetTemplate
empty
Methods inherited from Function1
compose, andThen
Methods inherited from IterableLike
iterator (abstract), thisCollection, toCollection, elements, foreach, forall, exists, find, foldRight, reduceRight, toIterable, head, take, slice, takeWhile, takeRight, dropRight, copyToArray, zip, zipAll, zipWithIndex, sameElements, toStream, canEqual, view, view, first, firstOption, projection
Methods inherited from GenericTraversableTemplate
genericBuilder, unzip, flatten, transpose
Methods inherited from TraversableLike
repr, nonEmpty, size, hasDefiniteSize, ++, ++, map, flatMap, filter, filterNot, partialMap, remove, partition, groupBy, count, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, sum, product, min, max, headOption, tail, last, lastOption, init, drop, dropWhile, span, splitAt, copyToBuffer, copyToArray, toArray, toList, toSeq, toIndexedSeq, toSet, mkString, mkString, mkString, addString, addString, addString, withFilter
Methods inherited from AnyRef
getClass, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Type Details
abstract type Pub <: ObservableSet[A]

Method Details
def +=(elem : A) : ObservableSet[A]
Adds a new element to the set.
Parameters
elem - the element to be added

def -=(elem : A) : ObservableSet[A]
Removes a single element from a set.
Parameters
elem - The element to be removed.

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