in scala/collection/immutable
trait Set

trait Set[A]()
extends Object
with ScalaObject
with Set[A]
Implementing classes or objects:
class TreeSet[A](view: (A) => Ordered[A])
class ListSet[A]()

This trait represents immutable sets. Concrete set implementations just have to provide functionality for the abstract methods in scala.collection.Set as well as for + and -.
Author:
Matthias Zenger
Version:
1.1, 03/05/2004

Method Summary
abstract def +(elem: A): Set[A]
     This method creates a new set with an additional element.
abstract def -(elem: A): Set[A]
     - can be used to remove a single element from a set.
  def excl(elems: A*): Set[A]
     excl removes many elements from the set.
  def excl(that: Iterable[A]): Set[A]
     This method removes all the elements provided by an iterator of the iterable object that from the set.
  def filter(p: (A) => Boolean): Set[A]
     Method filter removes all elements from the set for which the predicate p yields the value false.
override def hashCode(): Int
     hashcode for this set
  def incl(elems: A*): Set[A]
     incl can be used to add many elements to the set at the same time.
  def incl(that: Iterable[A]): Set[A]
     This method will add all the elements provided by an iterator of the iterable object that to the set.
  def intersect(that: Set[A]): Set[A]
     This method computes an intersection with set that.

Methods inherited from java/lang/Object-class
clone, eq, finalize, getClass, ne, notify, notifyAll, synchronized, wait, wait, wait

Methods inherited from scala/Any-class
!=, ==, asInstanceOf, isInstanceOf, match

Methods inherited from scala/Iterable-class
/:, :\, concat, elements, exists, find, foldLeft, foldRight, forall, foreach, sameElements

Methods inherited from scala/ScalaObject-class
getScalaType

Methods inherited from scala/collection/Set-class
apply, contains, equals, isEmpty, size, subsetOf, toList, toString

Method Detail

+

  abstract def +(elem: A): Set[A]
This method creates a new set with an additional element.

incl

  def incl(elems: A*): Set[A]
incl can be used to add many elements to the set at the same time.

incl

  def incl(that: Iterable[A]): Set[A]
This method will add all the elements provided by an iterator of the iterable object that to the set.

-

  abstract def -(elem: A): Set[A]
- can be used to remove a single element from a set.

excl

  def excl(elems: A*): Set[A]
excl removes many elements from the set.

excl

  def excl(that: Iterable[A]): Set[A]
This method removes all the elements provided by an iterator of the iterable object that from the set.

intersect

  def intersect(that: Set[A]): Set[A]
This method computes an intersection with set that. It removes all the elements that are not present in that.

filter

  def filter(p: (A) => Boolean): Set[A]
Method filter removes all elements from the set for which the predicate p yields the value false.

hashCode

  override def hashCode(): Int
hashcode for this set