All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jhotdraw8.icollection.readonly.ReadOnlyNavigableSet Maven / Gradle / Ivy

The newest version!
package org.jhotdraw8.icollection.readonly;

import org.jspecify.annotations.Nullable;

/**
 * A read-only interface to a navigable set.
 *
 * @param  the element type
 */
public interface ReadOnlyNavigableSet extends ReadOnlySortedSet {
    /**
     * Returns the least element in this set greater than or equal to the given element,
     * or null if there is no such element.
     *
     * @param e the given element
     * @return ceiling element or null
     */
    @Nullable E ceiling(E e);

    /**
     * Returns the greatest element in this set less than or equal to the given element,
     * or null if there is no such element.
     *
     * @param e the given element
     * @return floor element or null
     */
    @Nullable E floor(E e);

    /**
     * Returns the least element in this set greater than the given element,
     * or null if there is no such element.
     *
     * @param e the given element
     * @return higher element or null
     */
    @Nullable E higher(E e);

    /**
     * Returns the greatest element in this set less than the given element,
     * or null if there is no such element.
     *
     * @param e the given element
     * @return lower element or null
     */
    @Nullable E lower(E e);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy