Scala Library Documentation
|
|
class
ImmutableSetAdaptor[A](protected val
set : Set[A])
extends
Set[A]empty
has
to be redefined if the immutable set on which this mutable set is
originally based is not empty. empty
is supposed to
return the representation of an empty set.Method Summary | |
def
|
+=
(elem : A) : Unit
Add a new element to the set.
|
def
|
-=
(elem : A) : Unit
Removes a single element from a set.
|
override def
|
clear
: Unit
Removes all elements from the set. After this operation is completed,
the set will be empty.
|
def
|
contains
(elem : A) : Boolean
Checks if this set contains element
elem . |
def
|
elements
: Iterator[A]
Creates a new iterator over all elements contained in this
object.
|
override def
|
exists
(p : (A) => Boolean) : Boolean
Apply a predicate
p to all elements of this
iterable object and return true, iff there is at least one
element for which p yields true. |
override def
|
foreach
(f : (A) => Unit) : Unit
Apply a function
f to all elements of this
iterable object. |
override def
|
isEmpty
: Boolean
Checks if this set is empty.
|
def
|
size
: Int
Returns the number of elements in this set.
|
override def
|
toList
: List[A]
Create a fresh list with all the elements of this iterable object.
|
override def
|
toString : java.lang.String |
Methods inherited from Set | |
update, +=, ++=, ++=, +, +, ++, ++, incl, -=, --=, --=, -, -, --, --, excl, intersect, retain, <<, clone, readOnly |
Methods inherited from Set | |
apply, subsetOf, *, **, equals, hashCode, toArray, stringPrefix |
Methods inherited from Iterable | |
concat, ++, map, flatMap, filter, partition, takeWhile, dropWhile, take, drop, forall, 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
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.f
to all elements of this
iterable object.f -
a function that is applied to every element.p
to all elements of this
iterable object and return true, iff there is at least one
element for which p
yields true.p -
the predicateoverride
def
toString : java.lang.String
elem -
the element to be addedelem -
The element to be removed.override
def
clear : Unit
Scala Library Documentation
|
|