in scala/collection/mutable
class JavaSetAdaptor

class JavaSetAdaptor[A](jset: java.util.Set)
extends Set[A]
with ScalaObject

This class can be used as an adaptor to create mutable sets from Java classes that implement interface java.util.Set.
Author:
Matthias Zenger
Version:
1.0, 19/09/2003

Method Summary
  def +=(elem: A): Unit
     This method adds a new element to the set.
  def -=(elem: A): Unit
     -= can be used to remove a single element from a set.
  def clear: Unit
     Removes all elements from the set.
override def clone(): Set[A]
     Return a clone of this set.
  def contains(elem: A): Boolean
     Checks if this set contains element elem.
  def elements: Iterator[A]
     Creates a new iterator over all elements contained in this object.
override def isEmpty: Boolean
     Checks if this set is empty.
  def size: Int
     Returns the number of elements in this set.

Methods inherited from java/lang/Object-class
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, exists, find, foldLeft, foldRight, forall, foreach, sameElements

Methods inherited from scala/ScalaObject-class
getScalaType

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

Methods inherited from scala/collection/mutable/Set-class
++=, ++=, --=, --=, <<, excl, filter, hashCode, incl, intersect, update

Method Detail

size

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

isEmpty

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

contains

  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.

elements

  def elements: Iterator[A]
Creates a new iterator over all elements contained in this object.
Returns:
the new iterator

+=

  def +=(elem: A): Unit
This method adds a new element to the set.

-=

  def -=(elem: A): Unit
-= can be used to remove a single element from a set.

clear

  def clear: Unit
Removes all elements from the set. After this operation is completed, the set will be empty.

clone

  override def clone(): Set[A]
Return a clone of this set.
Returns:
a set with the same elements.