@cute-dw/core
Version:
This TypeScript library is the main part of a more powerfull package designed for the fast WEB software development. The cornerstone of the library is the **DataStore** class, which might be useful when you need a full control of the data, but do not need
15 lines (14 loc) • 763 B
TypeScript
import { Comparator } from "../util/Comparator";
/**
* A Set that further provides a total ordering on its elements. The elements are ordered using their natural ordering, or by a `Comparator`
* typically provided at sorted set creation time. The set's iterator will traverse the set in ascending element order. Several additional
* operations are provided to take advantage of the ordering.
*/
export interface SortedSet<K> extends Set<K> {
/** Returns the comparator used to order the elements in this set */
get comparator(): Comparator<K>;
/** Returns the first (lowest) element currently in this set */
first(): K | undefined;
/** Returns the last (highest) element currently in this set */
last(): K | undefined;
}