Scala Library
|
|
scala/collection/immutable/TreeSet.scala
]
class
TreeSet[A](val
size : Int, t : Tree[Unit], implicit
view$3 : (A) => Ordered[A])
extends
RedBlack[A] with
SortedSet[A]Additional Constructor Summary | |
def
|
this
()(implicit view$4 : (A) => Ordered[A]) : TreeSet[A]
|
Value Summary | |
protected val
|
tree : Tree[Unit] |
Method Summary | |
def
|
+
(elem : A) : TreeSet[A]
A new TreeSet with the entry added is returned,
|
def
|
-
(elem : A) : TreeSet[A]
Remove a single element from a set.
|
override def
|
compare
(a0 : A, a1 : A) : Int
Comparison function that orders keys.
|
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.
|
def
|
elementsSlow : Iterator[A] |
def
|
empty
[B] : Set[B]
A factory to create empty maps of the same type of keys.
|
override def
|
exists
(f : (A) => Boolean) : Boolean
Apply a predicate
p to all elements of this
iterable object and return true, iff there is at least one
element for which p yields true. |
override def
|
firstKey
: A
Returns the first key of the collection.
|
override def
|
forall
(f : (A) => Boolean) : Boolean
Apply a predicate
p to all elements of this
iterable object and return true, iff the predicate yields
true for all elements. |
override def
|
foreach
(f : (A) => Unit) : Unit
Apply a function
f to all elements of this
iterable object. |
def
|
insert
(elem : A) : TreeSet[A]
A new TreeSet with the entry added is returned,
assuming that elem is not in the TreeSet.
|
def
|
isSmaller (x : A, y : A) : Boolean |
override def
|
lastKey
: A
Returns the last key of the collection.
|
override def
|
rangeImpl
(from : Option[A], until : Option[A]) : TreeSet[A]
Creates a ranged projection of this collection. Any mutations in the
ranged projection will update this collection and vice versa. Keys
are garuanteed to be consistent between the collection and its projection.
|
Methods inherited from SortedSet | |
++ |
Methods inherited from Set | |
+, ++, incl, incl, -, --, --, excl, excl, intersect, **, map, flatMap, filter |
Methods inherited from SortedSet | |
keySet, from, until, range, subsetOf |
Methods inherited from Sorted | |
to, hasAll |
Methods inherited from Set | |
apply, isEmpty, *, equals, hashCode, toArray, stringPrefix |
Methods inherited from Collection | |
toString |
Methods inherited from Iterable | |
concat, ++, partition, takeWhile, dropWhile, take, drop, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, toSeq, toStream, mkString, mkString, mkString, addString, addString, addString, copyToArray, projection, hasDefiniteSize |
Methods inherited from Function1 | |
compose, andThen |
Methods inherited from AnyRef | |
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Additional Constructor Details |
Value Details |
Method Details |
elem -
the element to be removedelem
.elem -
the element to check for membership.elem
is contained in this set.f
to all elements of this
iterable object.f -
a function that is applied to every element.p
to all elements of this
iterable object and return true, iff the predicate yields
true for all elements.p -
the predicatep
to all elements of this
iterable object and return true, iff there is at least one
element for which p
yields true.p -
the predicatefrom -
The lower-bound (inclusive) of the ranged projection. None
if there is no lower bound.until -
The upper-bound (exclusive) of the ranged projection. None
if there is no upper bound.override
def
firstKey : A
override
def
lastKey : A
Scala Library
|
|