|
Scala
1.2.0.1 |
|||
Set
functions of the class into which it is mixed in.
Method Summary | |
override
|
def ++=(that: Iterable[A]): Unit
This method will add all the elements provided by an iterator of the iterable object that to the set.
|
override
|
def ++=(it: Iterator[A]): Unit
This method will add all the elements provided by an iterator of the iterable object that to the set.
|
override
|
def +=(elem: A): Unit
This method adds a new element to the set. |
override
|
def --=(that: Iterable[A]): Unit
This method removes all the elements provided by the the iterable object that from the set.
|
override
|
def --=(it: Iterator[A]): Unit
This method removes all the elements provided by an iterator it from the set.
|
override
|
def -=(elem: A): Unit
-= can be used to remove 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. |
override
|
def clone(): Set[A]
Return a clone of this set. |
override
|
def contains(elem: A): Boolean
Checks if this set contains element elem .
|
override
|
def excl(elems: A*): Unit
excl removes many elements from the set.
|
override
|
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 foreach(f: (A) => Unit): Unit
Apply a function f to all elements of this
iterable object.
|
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 .
|
override
|
def isEmpty: Boolean
Checks if this set is empty. |
override
|
def size: Int
Returns the number of elements in this set. |
override
|
def subsetOf(that: Set[A]): Boolean
Checks if this set is a subset of set that .
|
override
|
def toList: List[A]
Returns the elements of this set as a list. |
override
|
def toString(): String
Returns a string representation of this set. |
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 .
|
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, sameElements |
Methods inherited from scala/collection/Set-class |
apply, equals |
Methods inherited from scala/collection/mutable/Set-class |
hashCode |
Method Detail |
override def size: Int
override def isEmpty: Boolean
override def contains(elem: A): Boolean
elem
.
elem
-
the element to check for membership.
elem
is contained in this set.
override def update(elem: A, included: Boolean): Unit
elem
from this set depending on the value of parameter included
.
Typically, one would use the following syntax:
set(elem) = true
override def +=(elem: A): Unit
override def ++=(that: Iterable[A]): Unit
that
to the set.
override def ++=(it: Iterator[A]): Unit
that
to 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 -=(elem: A): Unit
-=
can be used to remove a single element from
a set.
override def --=(that: Iterable[A]): Unit
that
from the set.
override def --=(it: Iterator[A]): Unit
it
from the set.
override def excl(elems: A*): Unit
excl
removes many elements from the set.
override def intersect(that: Set[A]): Unit
that
.
It removes all the elements that are not present in that
.
override def clear: Unit
override def subsetOf(that: Set[A]): Boolean
that
.
that
-
another set.
override def foreach(f: (A) => Unit): Unit
f
to all elements of this
iterable object.
f
-
a function that is applied to every element.
override def filter(p: (A) => Boolean): Unit
filter
removes all elements from the set for
which the predicate p
yields the value false
.
override def toList: List[A]
override def toString(): String
override def <<(cmd: Message[A]): Unit
cmd
-
the message to send.
override def clone(): Set[A]
|
Scala
1.2.0.1 |
|||