|
Scala 2
v2.1.4 |
class
Set
[ A ]
extends
java.lang.Object with
(A) => scala.Boolean with
scala.Iterable[A] with
scala.ScalaObjectSet
may only be used for
accessing elements from set implementations. Two different extensions
of class Set
in the package scala.collections.mutable
and scala.collections.immutable
provide functionality for
adding new elements to a set. The class in the first package is implemented
by sets the are modified destructively, whereas the class in the second
package is used by functional set implementations that rely on immutable
data structures.Def Summary | |
def
apply
( elem : A )
: scala.Boolean
This method allows sets to be interpreted as predicates. It returns true, iff this set contains element elem .
|
|
def
contains
( elem : A )
: scala.Boolean
Checks if this set contains element elem .
|
|
override
|
def
equals
( that : scala.Any )
: scala.Boolean
Compares this set with another object and returns true, iff the other object is also a set which contains the same elements as this set. |
def
isEmpty
: scala.Boolean
Checks if this set is empty. |
|
def
size
: scala.Int
Returns the number of elements in this set. |
|
def
subsetOf
( that : scala.collection.Set[A] )
: scala.Boolean
Checks if this set is a subset of set that .
|
|
def
toList
: scala.List[A]
Returns the elements of this set as a list. |
|
override
|
def
toString
: java.lang.String
Returns a string representation of this set. |
Def Detail |
def
apply
( elem : A ) : scala.Boolean
elem
.elem
is contained in this set.def
contains
( elem : A ) : scala.Boolean
elem
.elem
is contained in this set.def
equals
( that : scala.Any ) : scala.Boolean
def
isEmpty
: scala.Boolean
def
size
: scala.Int
def
subsetOf
( that : scala.collection.Set[A] ) : scala.Boolean
that
.def
toList
: scala.List[A]
def
toString
: java.lang.String