Scala Library
|
|
scala/collection/JavaConversions.scala
]
case
class
JSetWrapper[A](val
underlying : java.util.Set[A])
extends
Set[A] with
MutableSetTemplate[A, JSetWrapper[A]] with
ProductMethod 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
|
canEqual
(arg0 : Any) : Boolean
An equality helper method to assist in maintaining reflexivity
in the face of subtyping. For more, see
http://www.artima.com/lejava/articles/equality.html
|
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 Unhashable | |
hashCode, identityHashCode |
Methods inherited from MutableSetTemplate | |
newBuilder, update, retain, clone, result, +, +, ++, ++, -, -, --, --, << |
Methods inherited from Shrinkable | |
-=, --=, --= |
Methods inherited from Builder | |
sizeHint, mapResult |
Methods inherited from Growable | |
+=, ++=, ++= |
Methods inherited from SetTemplate | |
isEmpty, apply, intersect, &, **, union, |, diff, &~, subsetOf, equals, stringPrefix, toString |
Methods inherited from Function1 | |
compose, andThen |
Methods inherited from IterableTemplate | |
elements, foreach, foldRight, reduceRight, toIterable, head, takeRight, dropRight, sameElements, toStream, view, view, first, firstOption, toSeq, projection |
Methods inherited from TraversableClass | |
genericBuilder, unzip, flatten, transpose |
Methods inherited from TraversableTemplate | |
thisCollection, nonEmpty, hasDefiniteSize, ++, ++, map, flatMap, filter, filterMap, filterNot, remove, partition, groupBy, forall, exists, count, find, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, headOption, tail, last, lastOption, init, take, drop, slice, takeWhile, dropWhile, span, splitAt, copyToBuffer, copyToArray, copyToArray, toArray, toList, toSequence, toSet, mkString, mkString, mkString, addString, addString, addString |
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
elem
.elem -
the element to check for membership.true
iff elem
is contained in this set.
def
+=(elem : A) : JSetWrapper[A]
elem -
the element to be added
def
-=(elem : A) : JSetWrapper[A]
elem -
The element to be removed.elem -
the element to be addedelem -
The element to be removed.override
def
clear : Unit
override
def
empty : JSetWrapper[A]
override
def
productPrefix : java.lang.String
override
def
productArity : Int
A(x_1,...,x_k)
A(x_1,...,x_k)
, returns x_(n+1)
for 0 <= n < k
n -
the index of the element to returnIndexOutOfBoundsException -
n
elements after the first element
Scala Library
|
|