scala.collection.JavaConversions

class JSetWrapper

[source: scala/collection/JavaConversions.scala]

case class JSetWrapper[A](val underlying : java.util.Set[A])
extends Set[A] with SetLike[A, JSetWrapper[A]] with Product
Method Summary
def += (elem : A) : JSetWrapper[A]
Adds a new element to the set.
def -= (elem : A) : JSetWrapper[A]
Removes a single element from a set.
override def add (elem : A) : Boolean
Adds a new element to the set.
override def clear : Unit
Removes all elements from the set. After this operation is completed, the set will be empty.
def contains (elem : A) : Boolean
Checks if this set contains element elem.
override def empty : JSetWrapper[A]
def iterator : Iterator[A]
Creates a new iterator over all elements contained in this iterable object.
override def productArity : Int
return k for a product A(x_1,...,x_k)
override def productElement (arg0 : Int) : Any
for a product A(x_1,...,x_k), returns x_(n+1) for 0 <= n < k
override def productPrefix : java.lang.String
By default the empty string. Implementations may override this method in order to prepend a string prefix to the result of the toString methods.
override def remove (elem : A) : Boolean
Removes a single element from a set.
override def size : Int
The number of elements in this collection
Methods inherited from Product
productIterator, productElements
Methods inherited from Set
companion
Methods inherited from SetLike
newBuilder, update, retain, clone, result, +, +, ++, ++, -, -, --, --, <<
Methods inherited from Shrinkable
-=, --=, --=
Methods inherited from Builder
sizeHint, mapResult
Methods inherited from Growable
+=, ++=, ++=
Methods inherited from SetLike
isEmpty, apply, intersect, &, **, union, |, diff, &~, subsetOf, stringPrefix, toString, hashCode, equals
Methods inherited from Function1
compose, andThen
Methods inherited from IterableLike
thisCollection, toCollection, elements, foreach, forall, exists, find, foldRight, reduceRight, toIterable, head, take, slice, takeWhile, takeRight, dropRight, copyToArray, zip, zipAll, zipWithIndex, sameElements, toStream, canEqual, view, view, first, firstOption, projection
Methods inherited from GenericTraversableTemplate
genericBuilder, unzip, flatten, transpose
Methods inherited from TraversableLike
repr, nonEmpty, hasDefiniteSize, ++, ++, map, flatMap, filter, filterNot, partialMap, remove, partition, groupBy, count, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, sum, product, min, max, headOption, tail, last, lastOption, init, drop, dropWhile, span, splitAt, copyToBuffer, copyToArray, toArray, toList, toSeq, toIndexedSeq, toSet, mkString, mkString, mkString, addString, addString, addString, withFilter
Methods inherited from AnyRef
getClass, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
override def size : Int
The number of elements in this collection

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

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.

def +=(elem : A) : JSetWrapper[A]
Adds a new element to the set.
Parameters
elem - the element to be added
Overrides
SetLike.+=

def -=(elem : A) : JSetWrapper[A]
Removes a single element from a set.
Parameters
elem - The element to be removed.
Overrides
SetLike.-=

override def add(elem : A) : Boolean
Adds a new element to the set.
Parameters
elem - the element to be added
Returns
true if the element was not yet present in the set.
Overrides
SetLike.add

override def remove(elem : A) : Boolean
Removes a single element from a set.
Parameters
elem - The element to be removed.
Returns
true if the element was already present in the set.
Overrides
SetLike.remove

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

override def empty : JSetWrapper[A]

override def productPrefix : java.lang.String
By default the empty string. Implementations may override this method in order to prepend a string prefix to the result of the toString methods.
Overrides
Product.productPrefix

override def productArity : Int
return k for a product A(x_1,...,x_k)
Overrides
Product.productArity

override def productElement(arg0 : Int) : Any
for a product A(x_1,...,x_k), returns x_(n+1) for 0 <= n < k
Parameters
n - the index of the element to return
Throws
IndexOutOfBoundsException -
Returns
The element n elements after the first element
Overrides
Product.productElement