|
Scala Library
|
|
scala/collection/mutable/SetProxy.scala]
trait
SetProxy[A]
extends Set[A] with SetProxy[A]scala.collection.mutable.Set.
It is most useful for assembling customized set abstractions
dynamically using object composition and forwarding.| 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.
|
override 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.
|
override def
|
excl
(elems : A*) : Unit
excl removes many elements from the set. |
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
|
retain
(p : (A) => Boolean) : Unit
Method
retain removes all elements from the set for
which the predicate |
abstract def
|
self : Set[A] |
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 |
| Methods inherited from SetProxy | |
| size, isEmpty, contains, subsetOf |
| Methods inherited from IterableProxy | |
| elements, concat, ++, map, flatMap, filter, partition, takeWhile, dropWhile, take, drop, foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, toSeq, toStream, mkString, mkString, mkString, addString, addString, addString, copyToArray, projection, hasDefiniteSize |
| Methods inherited from Proxy | |
| hashCode, equals, toString |
| Methods inherited from Set | |
| +=, +, +, ++, ++, -=, -, -, --, --, readOnly |
| Methods inherited from Set | |
| apply, *, **, toArray, stringPrefix |
| 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 |
elem
from this set depending on the value of parameter included.
Typically, one would use the following syntax:
set(elem) = true
elem - the element to be addedthat to the set.elems - the iterable object containing the elements to be addedelems to the set.elems - the iterator containing the elements to be addedincl can be used to add many elements to the set
at the same time.++= insteadelem - The element to be removed.elems from the set.elems from the set.excl removes many elements from the set.that.
It removes all the elements that are not present in that.that - the set to intersect with.override
def
clear : Unit
retain removes all elements from the set for
which the predicate p yields the value false.cmd - the message to send.<code>Predef.UnsupportedOperationException</code> - if the message was not understood.|
Scala Library
|
|