SkipList<T> class

A probabilistic ordered set keyed by a Comparator.

Constructors

SkipList(Comparator<T> _compare, {Random? random})
Creates an empty set ordered by compare. Pass random (seeded) for deterministic level promotion; defaults to a fresh Random. Audited: 2026-06-12 11:26 EDT

Properties

hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Whether the set holds no elements. Audited: 2026-06-12 11:26 EDT
no setter
length int
Number of elements in the set. Audited: 2026-06-12 11:26 EDT
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values Iterable<T>
All values in ascending order. Audited: 2026-06-12 11:26 EDT
no setter

Methods

add(T value) bool
Adds value; returns false (and changes nothing) if it is already present.
ceiling(T value) → T?
The smallest value >= value, or null if every value is smaller. Audited: 2026-06-12 11:26 EDT
contains(T value) bool
Whether value is present. Audited: 2026-06-12 11:26 EDT
floor(T value) → T?
The largest value <= value, or null if every value is greater.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(T value) bool
Removes value; returns false (and changes nothing) if it was absent. Audited: 2026-06-12 11:26 EDT
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited