TreeSet

@SerialVersionUID(3L) object TreeSet extends SortedIterableFactory[[A] =>> TreeSet[A]]

This object provides a set of operations to create immutable.TreeSet values.

Companion
class
Source
TreeSet.scala
trait SortedIterableFactory[[A] =>> TreeSet[A]]
class Object
trait Matchable
class Any

Value members

Concrete methods

def empty[A](implicit evidence$1: Ordering[A]): TreeSet[A]
def from[E](it: IterableOnce[E])(implicit ordering: Ordering[E]): TreeSet[E]
def newBuilder[A](implicit ordering: Ordering[A]): ReusableBuilder[A, TreeSet[A]]

Inherited methods

def apply[A](xs: A*)(implicit evidence$17: Ordering[A]): TreeSet[A]
def fill[A](n: Int)(elem: => A)(implicit evidence$18: Ordering[A]): TreeSet[A]

Produces a collection containing the results of some element computation a number of times.

Produces a collection containing the results of some element computation a number of times.

Value Params
elem

the element computation

n

the number of elements contained in the collection.

Returns

A collection that contains the results of n evaluations of elem.

Inherited from
EvidenceIterableFactory
Source
Factory.scala
def iterate[A](start: A, len: Int)(f: A => A)(implicit evidence$20: Ordering[A]): TreeSet[A]

Produces a collection containing repeated applications of a function to a start value.

Produces a collection containing repeated applications of a function to a start value.

Value Params
f

the function that's repeatedly applied

len

the number of elements contained in the collection

start

the start value of the collection

Returns

a collection with len values in the sequence start, f(start), f(f(start)), ...

Inherited from
EvidenceIterableFactory
Source
Factory.scala
def tabulate[A](n: Int)(f: Int => A)(implicit evidence$19: Ordering[A]): TreeSet[A]

Produces a collection containing values of a given function over a range of integer values starting from 0.

Produces a collection containing values of a given function over a range of integer values starting from 0.

Value Params
f

The function computing element values

n

The number of elements in the collection

Returns

A collection consisting of elements f(0), ..., f(n -1)

Inherited from
EvidenceIterableFactory
Source
Factory.scala
def unfold[A, S](init: S)(f: S => Option[(A, S)])(implicit evidence$21: Ordering[A]): TreeSet[A]

Produces a collection that uses a function f to produce elements of type A and update an internal state of type S.

Produces a collection that uses a function f to produce elements of type A and update an internal state of type S.

Type Params
A

Type of the elements

S

Type of the internal state

Value Params
f

Computes the next element (or returns None to signal the end of the collection)

init

State initial value

Returns

a collection that produces elements using f until f returns None

Inherited from
EvidenceIterableFactory
Source
Factory.scala

Implicits

Inherited implicits

implicit def evidenceIterableFactory[A](implicit evidence$23: Ordering[A]): Factory[A, TreeSet[A]]