in scala.collection.immutable
class ListSet

[scala.serializable]
`class` ListSet [A]
  `extends` java.lang.Object
  `with` scala.collection.immutable.Set[A]
  `with` scala.ScalaObject

  This class implements immutable sets using a list-based data structure. Instances of `ListSet` represent empty sets; they can be either created by calling the constructor directly, or by applying the function `ListSet.empty`.

Author:
  Matthias Zenger
Version:
  1.0, 09/07/2003

Direct Known Subclasses:
  Node

Class Summary
`protected` | `class` Node

Constructor Summary
| `def` this

Def Summary
| `def` + (elem: A) : scala.collection.immutable.ListSet[A] This method creates a new set with an additional element.
| `def` - (elem: A) : scala.collection.immutable.ListSet[A] `-` can be used to remove a single element from a set.
| `def` contains (elem: A) : scala.Boolean Checks if this set contains element `elem`.
`protected` | `def` elem : A
| `def` elements : scala.Iterator[A] Creates a new iterator over all elements contained in this set.
| `def` empty [B] : scala.collection.immutable.ListSet[B]
`override` | `def` equals (obj: scala.Any) : scala.Boolean Compares two sets for equality. Two set are equal iff they contain the same elements.
`override` | `def` isEmpty : scala.Boolean
`protected` | `def` next : scala.collection.immutable.ListSet[A]
| `def` size : scala.Int Returns the number of elements in this set.

Def inherited from scala.collection.immutable.Set[A]
** , +, +, ++, ++, -, -, --, --, empty, excl, excl, filter, flatMap, incl, incl, intersect, map

Constructor Detail

`def` this

Def Detail

`def` + (elem: A): scala.collection.immutable.ListSet[A]

  This method creates a new set with an additional element.

`def` - (elem: A): scala.collection.immutable.ListSet[A]

  `-` can be used to remove a single element from a set.

`def` contains (elem: A): scala.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.

`protected def` elem : A

Throws:
  `Predef.NoSuchElementException -`

`def` elements : scala.Iterator[A]

  Creates a new iterator over all elements contained in this set.

Throws:
  `Predef.NoSuchElementException -`
Returns:
  the new iterator

`def` empty [B]: scala.collection.immutable.ListSet[B]

`override def` equals (obj: scala.Any): scala.Boolean

  Compares two sets for equality. Two set are equal iff they contain the same elements.

`override def` isEmpty : scala.Boolean

`protected def` next : scala.collection.immutable.ListSet[A]

Throws:
  `Predef.NoSuchElementException -`

`def` size : scala.Int

  Returns the number of elements in this set.

Returns:
  number of set elements.