|
Scala Library
|
|
scala/collection/jcl/Set.scala]
trait
Set[A]
extends Set[A] with Collection[A]| Method Summary | |
override def
|
+
(t : A) : Set[A]
adds "a" from the collection. Useful for chaining.
|
override def
|
++
(i : Iterable[A]) : Set[A]
Operator shortcut for addAll.
|
override def
|
- (t : A) : Set[A] |
override def
|
--
(i : Iterable[A]) : Set[A]
Operator shortcut for removeAll.
|
override abstract def
|
add
(a : A) : Boolean
Add will return false if "a" already exists in the set.
|
override def
|
clear
: Unit
clear all elements from the collection.
|
final def
|
contains
(a : A) : Boolean
Checks if this set contains element
elem. |
override def
|
isEmpty
: Boolean
Checks if this set is empty.
|
override def
|
projection
: Projection[A]
returns a projection that can be used to call non-strict
filter,
map, and flatMap methods that build projections
of the collection. |
override final def
|
retain
(f : (A) => Boolean) : Unit
Method
retain removes all elements from the set for
which the predicate |
override def
|
subsetOf
(set : Set[A]) : Boolean
Checks if this set is a subset of set
that. |
override def
|
transform
(f : (A) => A) : Boolean
Transforms each element of the collection in-place according to
f. |
| Methods inherited from Collection | |
| hasAll, addAll, -=, += |
| Methods inherited from MutableIterable | |
| elements (abstract), has, remove, removeAll, retainOnly, retainAll, size0 |
| Methods inherited from Set | |
| update, +=, ++=, ++=, +, ++, incl, -=, --=, --=, -, --, excl, intersect, <<, clone, readOnly |
| Methods inherited from Set | |
| size (abstract), apply, *, **, equals, hashCode, toArray, stringPrefix |
| Methods inherited from Collection | |
| toString |
| Methods inherited from Iterable | |
| 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, 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 |
| Class Summary | |
class
|
Filter
(pp : (A) => Boolean) extends Filter with Projection[A]
|
| Method Details |
elem.elem - the element to check for membership.true iff elem is contained in this set.retain removes all elements from the set for
which the predicate p yields the value false.override
def
isEmpty : Boolean
true iff there is no element in the set.override
def
clear : Unit
that.that - another set.true iff the other set is a superset of this set.
todo: rename to isSubsetOff.f - true if the collection is actually updated.override
def
projection : Projection[A]
filter,
map, and flatMap methods that build projections
of the collection.|
Scala Library
|
|