scala.collection

trait SetProxyLike

[source: scala/collection/SetProxyLike.scala]

trait SetProxyLike[A, +This <: SetLike[A, This] with Set[A]]
extends SetLike[A, This] with IterableProxyLike[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 IterableProxyLike
iterator, foreach, foldRight, reduceRight, toIterable, zip, zipAll, zipWithIndex, head, takeRight, dropRight, sameElements, toStream, view, view
Methods inherited from TraversableProxyLike
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, toSeq, toSet, mkString, mkString, mkString, addString, addString, addString, stringPrefix
Methods inherited from Proxy
hashCode, equals, toString
Methods inherited from SetLike
empty (abstract), + (abstract), - (abstract), newBuilder, **
Methods inherited from Subtractable
-, --, --
Methods inherited from Addable
+, ++, ++
Methods inherited from IterableLike
thisCollection, toCollection, elements, canEqual, first, firstOption, projection
Methods inherited from TraversableLike
repr, partialMap, sum, product, min, max, toIndexedSeq, withFilter
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
SetLike.contains

override def isEmpty : Boolean
Checks if this set is empty.
Returns
true iff there is no element in the set.
Overrides
SetLike.isEmpty, IterableProxyLike.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
SetLike.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
SetLike.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
SetLike.&

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
SetLike.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
SetLike.|

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
SetLike.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
SetLike.&~

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
SetLike.subsetOf