Package ghidra.generic.util.datastruct
Interface SortedList<E>
- Type Parameters:
E
- the type of elements in this list
- All Superinterfaces:
Iterable<E>
,ValueSortedMap.LesserList<E>
- All Known Implementing Classes:
RestrictedValueSortedMap.RestrictedSortedList
,TreeValueSortedMap.ValueSortedTreeMapValues
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 TypeMethodDescriptionint
ceilingIndex
(E element) Returns the least index in this list whose element is greater than or equal to the specified elementint
floorIndex
(E element) Returns the greatest index in this list whose element is less than or equal to the specified elementint
higherIndex
(E element) Returns the least index in this list whose element is strictly greater the specified elementint
lowerIndex
(E element) Returns the greatest index in this list whose element is strictly less than the specified elementMethods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
lowerIndex
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
Returns the greatest index in this list whose element is less than or equal to the specified elementIf 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
Returns the least index in this list whose element is greater than or equal to the specified elementIf 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
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
-