scala.collection

trait SetProxy

[source: scala/collection/SetProxy.scala]

trait SetProxy[A]
extends Set[A] with IterableProxy[A]
This is a simple wrapper class for scala.collection.Set. It is most useful for assembling customized set abstractions dynamically using object composition and forwarding.
Author
Matthias Zenger
Martin Odersky
Version
2.0, 01/01/2007
Direct Known Subclasses:
SetProxy

Method Summary
def contains (elem : A) : Boolean
Checks if this set contains element elem.
override def isEmpty : Boolean
Checks if this set is empty.
abstract def self : Set[A]
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.
Methods inherited from IterableProxy
elements, 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, projection, hasDefiniteSize
Methods inherited from Proxy
hashCode, equals, toString
Methods inherited from Set
apply, *, **, toArray, stringPrefix
Methods inherited from Function1
compose, andThen
Methods inherited from AnyRef
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
abstract def self : Set[A]
Overrides
IterableProxy.self

def size : Int
Returns the number of elements in this set.
Returns
number of set elements.
Overrides
Set.size

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

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
Set.contains

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