Class RestrictedValueSortedMap.RestrictedSortedList

java.lang.Object
ghidra.generic.util.datastruct.RestrictedValueSortedMap.RestrictedSortedList
All Implemented Interfaces:
SortedList<V>, ValueSortedMap.LesserList<V>, Iterable<V>
Enclosing class:
RestrictedValueSortedMap<K,V>

public class RestrictedValueSortedMap.RestrictedSortedList extends Object implements SortedList<V>
  • Constructor Details

    • RestrictedSortedList

      public RestrictedSortedList()
  • Method Details

    • toList

      public List<V> toList()
      Description copied from interface: ValueSortedMap.LesserList
      Copy this to a new list
      Specified by:
      toList in interface ValueSortedMap.LesserList<V>
      Returns:
      the list
    • size

      public int size()
      Specified by:
      size in interface ValueSortedMap.LesserList<V>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface ValueSortedMap.LesserList<V>
    • contains

      public boolean contains(Object o)
      Specified by:
      contains in interface ValueSortedMap.LesserList<V>
    • iterator

      public Iterator<V> iterator()
      Specified by:
      iterator in interface Iterable<V>
    • get

      public V get(int index)
      Description copied from interface: ValueSortedMap.LesserList
      Get the element at the given index
      Specified by:
      get in interface ValueSortedMap.LesserList<V>
      Parameters:
      index - the index
      Returns:
      the element
    • indexOf

      public int indexOf(Object o)
      Description copied from interface: ValueSortedMap.LesserList
      Get the index of a given element

      Returns the index of the element, or -1 if not found

      Specified by:
      indexOf in interface ValueSortedMap.LesserList<V>
      Parameters:
      o - the object
      Returns:
      the index or -1
    • listIterator

      public ListIterator<V> listIterator(int index)
      Specified by:
      listIterator in interface ValueSortedMap.LesserList<V>
    • poll

      public V poll()
      Description copied from interface: ValueSortedMap.LesserList
      Get and remove the first element
      Specified by:
      poll in interface ValueSortedMap.LesserList<V>
      Returns:
      the first element, or null if empty
    • remove

      public boolean remove(Object o)
      Specified by:
      remove in interface ValueSortedMap.LesserList<V>
    • lowerIndex

      public int lowerIndex(V element)
      Description copied from interface: SortedList
      Returns the greatest index in this list whose element is strictly less than the specified element
      Specified by:
      lowerIndex in interface SortedList<V>
      Parameters:
      element - the element to search for
      Returns:
      the index of the found element, or -1
    • floorIndex

      public int floorIndex(V element)
      Description copied from interface: SortedList
      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.

      Specified by:
      floorIndex in interface SortedList<V>
      Parameters:
      element - the element to search for
      Returns:
      the index of the found element, or -1
    • ceilingIndex

      public int ceilingIndex(V element)
      Description copied from interface: SortedList
      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.

      Specified by:
      ceilingIndex in interface SortedList<V>
      Parameters:
      element - the element to search for
      Returns:
      the index of the found element, or -1
    • higherIndex

      public int higherIndex(V element)
      Description copied from interface: SortedList
      Returns the least index in this list whose element is strictly greater the specified element
      Specified by:
      higherIndex in interface SortedList<V>
      Parameters:
      element - the element to search for
      Returns:
      the index of the found element, or -1