scala.collection.generic

trait SetProxyTemplate

[source: scala/collection/generic/SetProxyTemplate.scala]

trait SetProxyTemplate[A, +This <: SetTemplate[A, This] with Set[A]]
extends SetTemplate[A, This] with IterableProxyTemplate[A, This]
This trait implements a proxy for sets. It forwards all calls to a different set.
Author
Martin Odersky
Version
2.8
Direct Known Subclasses:
SetProxy, SetProxy, SetProxy

Method Summary
override def & (that : Set[A]) : This
Returns a new set consisting of all elements that are both in the current set and in the argument set.
override def &~ (that : Set[A]) : This
The difference of this set and the given set that.
override def apply (elem : A) : Boolean
This method allows sets to be interpreted as predicates. It returns true, iff this set contains element elem.
override def contains (elem : A) : Boolean
Checks if this set contains element elem.
override def diff (that : Set[A]) : This
The difference of this set and the given set that.
override def intersect (that : Set[A]) : This
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 subsetOf (that : Set[A]) : Boolean
Checks if this set is a subset of set that.
override def union (that : Set[A]) : This
The union of this set and the given set that.
override def | (that : Set[A]) : This
The union of this set and the given set that.
Methods inherited from IterableProxyTemplate
iterator, foreach, foldRight, reduceRight, toIterable, head, takeRight, dropRight, sameElements, toStream, view, view
Methods inherited from TraversableProxyTemplate
self (abstract), nonEmpty, size, hasDefiniteSize, ++, ++, map, flatMap, filter, filterNot, remove, partition, groupBy, forall, exists, count, find, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, headOption, tail, last, lastOption, init, take, drop, slice, takeWhile, dropWhile, span, splitAt, copyToBuffer, copyToArray, copyToArray, toArray, toList, toSequence, toSet, mkString, mkString, mkString, addString, addString, addString, stringPrefix
Methods inherited from Proxy
hashCode, equals, toString
Methods inherited from SetTemplate
empty (abstract), + (abstract), - (abstract), newBuilder, **
Methods inherited from Subtractable
-, --, --
Methods inherited from Addable
+, ++, ++
Methods inherited from IterableTemplate
elements, first, firstOption, toSeq, projection
Methods inherited from TraversableTemplate
thisCollection, filterMap
Methods inherited from AnyRef
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
override def contains(elem : A) : Boolean
Checks if this set contains element elem.
Parameters
elem - the element to check for membership.
Returns
true iff elem is contained in this set.
Overrides
SetTemplate.contains

override def isEmpty : Boolean
Checks if this set is empty.
Returns
true iff there is no element in the set.
Overrides
SetTemplate.isEmpty, IterableProxyTemplate.isEmpty

override def apply(elem : A) : Boolean
This method allows sets to be interpreted as predicates. It returns true, iff this set contains element elem.
Parameters
elem - the element to check for membership.
Returns
true iff elem is contained in this set.
Overrides
SetTemplate.apply

override def intersect(that : Set[A]) : This
Returns a new set consisting of all elements that are both in the current set and in the argument set.
Parameters
that - the set to intersect with.
Overrides
SetTemplate.intersect

override def &(that : Set[A]) : This
Returns a new set consisting of all elements that are both in the current set and in the argument set.
Parameters
that - the set to intersect with.
Notes
same as intersect.
Overrides
SetTemplate.&

override def union(that : Set[A]) : This
The union of this set and the given set that.
Parameters
that - the set of elements to add
Returns
a set containing the elements of this set and those of the given set that.
Overrides
SetTemplate.union

override def |(that : Set[A]) : This
The union of this set and the given set that.
Parameters
that - the set of elements to add
Returns
a set containing the elements of this set and those of the given set that.
Notes
same as union.
Overrides
SetTemplate.|

override def diff(that : Set[A]) : This
The difference of this set and the given set that.
Parameters
that - the set of elements to remove
Returns
a set containing those elements of this set that are not also contained in the given set that.
Overrides
SetTemplate.diff

override def &~(that : Set[A]) : This
The difference of this set and the given set that.
Parameters
that - the set of elements to remove
Returns
a set containing those elements of this set that are not also contained in the given set that.
Notes
same as diff.
Overrides
SetTemplate.&~

override def subsetOf(that : Set[A]) : Boolean
Checks if this set is a subset of set that.
Parameters
that - another set.
Returns
true iff the other set is a superset of this set. todo: rename to isSubsetOf
Overrides
SetTemplate.subsetOf