Scoop API

scoop:scoop.std:0.1.0

TreeSet

class TreeSet

source · line 9
public
public class TreeSet<T> public constructor(
    /**
     * The comparator used for ordering and, for ordered maps/sets, equivalence.
     */
    public override val comparator: Comparator<T>
) : MutableSortedSet<T>

A mutable set ordered by its comparator. Comparator-equivalent elements share one membership slot.

function lower

source · line 65
public
public override fun lower(element: T): T?
  • Overrides lower · SortedSet

Returns the greatest element strictly below the argument, or None.

function floor

source · line 69
public
public override fun floor(element: T): T?
  • Overrides floor · SortedSet

Returns the greatest element at or below the argument, or None.

function ceiling

source · line 73
public
public override fun ceiling(element: T): T?

Returns the least element at or above the argument, or None.

function firstOrNone

source · line 57
public
public override fun firstOrNone(): T?

Returns the least element, or None when empty.

property comparator

source · line 13
public
public override val comparator: Comparator<T>

get: public read-only

The comparator used for ordering and, for ordered maps/sets, equivalence.

function lastOrNone

source · line 61
public
public override fun lastOrNone(): T?

Returns the greatest element, or None when empty.

function iterator

source · line 47
public
public override operator fun iterator(): Iterator<T>

Iterates this set's members in its defined order; structural changes invalidate the iterator.

function higher

source · line 77
public
public override fun higher(element: T): T?

Returns the least element strictly above the argument, or None.