TreeSet

Description

class Tinman.Core.Collections.TreeSet<T>

Derived from

SortedSetBase<T> abstract

An implementation of the IBag interface that uses a balanced binary tree for storing the set elements.

A specialized container may be created by subclassing TreeSet and specifying a suitable CompareDelegate in the constructor, optionally overriding the following methods to provide custom semantics:

Public / Constructors

Copy


public static method Copy → (2)

values in : IBagConst<T>

The values to copy or null to create an empty set.

compare opt : CompareDelegate<T> = null

The comparison delegate. If null, IBagConst.MethodComparison of values in will be used, which must not be null in this case.

returns → TreeSet<T>

The created TreeSet object.

Copies the given values in into a compact TreeSet.

Tree​Set


public constructor TreeSet → (2)

compare in : CompareDelegate<T>

[not-null]
The comparison for values.

capacity opt : int32 = 12

[>=0]
The initial capacity of the set, in values.

Creates a new instance of TreeSet.

Wrap


[Pure]
public static method Wrap → (2)

element in : T

The set element.

compare opt : CompareDelegate<T> = null

[not-null]
The comparison for values.

returns → TreeSet<T>

The set.

Creates a compact set that initially holds the given element.