Scala Library
|
|
trait
SynchronizedSet[A]
extends
Set[A]Set
functions of the class into which it is mixed in.Method Summary | |
override def
|
++=
(it : Iterator[A]) : SynchronizedSet[A]
Adds a number of elements provided by an iterator to this collection.
|
override def
|
++=
(that : Traversable[A]) : SynchronizedSet[A]
Adds a number of elements provided by an iterable object to this collection.
|
def
|
+=
(elem : A) : SynchronizedSet[A]
Adds a new element to the set.
|
override def
|
--=
(that : Traversable[A]) : SynchronizedSet[A]
Removes a number of elements provided by an iterable object from this collection.
|
override def
|
--=
(it : Iterator[A]) : SynchronizedSet[A]
Removes a number of elements provided by an iterator from this collection.
|
def
|
-=
(elem : A) : SynchronizedSet[A]
Removes a single element from a set.
|
override def
|
<<
(cmd : Message[A]) : Unit
Send a message to this scriptable object.
|
override def
|
add
(elem : A) : Boolean
Adds a new element to the set.
|
def
|
clear
: Unit
Removes all elements from the set. After this operation is completed,
the set will be empty.
|
override def
|
clone
: Set[A]
This method creates and returns a copy of the receiver object.
|
def
|
contains
(elem : A) : Boolean
Checks if this set contains element
elem . |
override def
|
foreach
[U](f : (A) => U) : Unit
Apply a function
f to all elements of this
iterable object. |
override def
|
intersect
(that : Set[A]) : Set[A]
Returns a new set consisting of all elements that are both in the current
set and in the argument set.
|
override def
|
isEmpty
: Boolean
Checks if this set is empty.
|
override def
|
remove
(elem : A) : Boolean
Removes a single element from a set.
|
override def
|
retain
(p : (A) => Boolean) : Unit
Removes all elements from the set for which the predicate
p
yields the value false . |
def
|
size
: Int
The number of elements in this collection
|
override def
|
subsetOf
(that : Set[A]) : Boolean
Checks if this set is a subset of set
that . |
override def
|
toList
: List[A]
Returns a list with all elements of this traversable object.
|
override def
|
toString
: java.lang.String
Need to override string, so that it's not the Function1's string that gets mixed in.
|
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 Set | |
companion |
Methods inherited from SetLike | |
newBuilder, result, +, +, ++, ++, -, -, --, -- |
Methods inherited from Shrinkable | |
-= |
Methods inherited from Builder | |
sizeHint, mapResult |
Methods inherited from Growable | |
+= |
Methods inherited from SetLike | |
apply, &, **, union, |, diff, &~, stringPrefix, hashCode, equals |
Methods inherited from GenericSetTemplate | |
empty |
Methods inherited from Function1 | |
compose, andThen |
Methods inherited from IterableLike | |
iterator (abstract), thisCollection, toCollection, elements, 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, 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, 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 |
Method Details |
def
size : Int
override
def
isEmpty : Boolean
true
iff there is no element in the set.elem
.elem -
the element to check for membership.true
iff elem
is contained in this set.
def
+=(elem : A) : SynchronizedSet[A]
elem -
the element to be addedoverride
def
++=(that : Traversable[A]) : SynchronizedSet[A]
iter -
the iterable object.override
def
++=(it : Iterator[A]) : SynchronizedSet[A]
iter -
the iterator.
def
-=(elem : A) : SynchronizedSet[A]
elem -
The element to be removed.override
def
--=(that : Traversable[A]) : SynchronizedSet[A]
iter -
the iterable object.override
def
--=(it : Iterator[A]) : SynchronizedSet[A]
iter -
the iterator.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 addedelem -
The element to be removed.that -
the set to intersect with.
def
clear : Unit
that
.that -
another set.true
iff the other set is a superset of this set.
todo: rename to isSubsetOff
to all elements of this
iterable object.f -
A function that is applied for its side-effect to every element. The result (of arbitrary type U) of function `f` is discarded.p
yields the value false
.override
def
toString : java.lang.String
cmd -
the message to send.<code>Predef.UnsupportedOperationException</code> -
if the message was not understood.
The default implementation of the clone
method is platform dependent.
Scala Library
|
|