import { SortedSet } from "./SortedSet";
/**
 * A `SortedSet` extended with navigation methods reporting closest matches for given search targets
 */
export interface NavigableSet<K> extends SortedSet<K> {
    /** Returns the least element in this set greater than or equal to the given element, or _undefined_ if there is no such element */
    ceiling(key: K): K | undefined;
    /** Returns the greatest element in this set less than or equal to the given element, or _undefined_ if there is no such element */
    floor(key: K): K | undefined;
    /** Returns the least element in this set strictly greater than the given element, or _undefined_ if there is no such element */
    higher(key: K): K | undefined;
    /** Returns the greatest element in this set strictly less than the given element, or _undefined_ if there is no such element */
    lower(key: K): K | undefined;
    /** Retrieves and removes the first (lowest) element, or returns _undefined_ if this set is empty */
    pollFirst(): K | undefined;
    /** Retrieves and removes the last (highest) element, or returns _undefined_ if this set is empty */
    pollLast(): K | undefined;
}
