Package ghidra.generic.util.datastruct

# Interface SortedList<E>

Type Parameters:
  `E` - the type of elements in this list

All Superinterfaces:
  `Collection<E>`, `Iterable<E>`, `List<E>`

All Known Implementing Classes:
  `RestrictedValueSortedMap.RestrictedSortedList`, `TreeValueSortedMap.ValueSortedTreeMapValues`

public interface SortedList<E> extends List<E>
An interface for sorted lists

This might be better described as a NavigableMultiset; however, I wish for the elements to be retrievable by index, though insertion and mutation is not permitted by index. This implies that though unordered, the underlying implementation has sorted the elements in some way and wishes to expose that ordering to its clients.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `ceilingIndex(E element)`
  Returns the least index in this list whose element is greater than or equal to the specified element
  `int`
  `floorIndex(E element)`
  Returns the greatest index in this list whose element is less than or equal to the specified element
  `int`
  `higherIndex(E element)`
  Returns the least index in this list whose element is strictly greater the specified element
  `int`
  `lowerIndex(E element)`
  Returns the greatest index in this list whose element is strictly less than the specified element

  ### Methods inherited from interface java.util.Collection

  `parallelStream, removeIf, stream, toArray`

  ### Methods inherited from interface java.lang.Iterable

  `forEach`

  ### Methods inherited from interface java.util.List

  `add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray`

- ## Method Details

  - ### lowerIndex

    int lowerIndex(E element)
    Returns the greatest index in this list whose element is strictly less than the specified element
    Parameters:
      `element` - the element to search for
    Returns:
      the index of the found element, or -1

  - ### floorIndex

    int floorIndex(E element)
    Returns the greatest index in this list whose element is less than or equal to the specified element

    If multiples of the specified element exist, this returns the least index of that element.

    Parameters:
      `element` - the element to search for
    Returns:
      the index of the found element, or -1

  - ### ceilingIndex

    int ceilingIndex(E element)
    Returns the least index in this list whose element is greater than or equal to the specified element

    If multiples of the specified element exist, this returns the greatest index of that element.

    Parameters:
      `element` - the element to search for
    Returns:
      the index of the found element, or -1

  - ### higherIndex

    int higherIndex(E element)
    Returns the least index in this list whose element is strictly greater the specified element
    Parameters:
      `element` - the element to search for
    Returns:
      the index of the found element, or -1