Interface IOrderedList<T>

All Superinterfaces:
ICollection<T>, IHashEntry<Object,IStoredList<T>>, IObjectsList, IStoredList<T>
All Known Implementing Classes:
ExternallyLockedStoredList

public interface IOrderedList<T> extends IStoredList<T>
Since:
6.1
Author:
anna
  • Method Details

    • establishListOrderedScan

      IStoredListIterator<T> establishListOrderedScan(IObjectInfo<T> OrderedScanPivot, boolean ascending)
      establish a scan position in one direction ascending (towards head) or descending (towards tail). Used by the OrderedIndex masterList to establish an index scan.
      Parameters:
      OrderedScanPivot - a pivot from which to start this scan. if null, pivot is Head (if ascending is true); Tail otherwise
      ascending - if true scan from pivot towards head; if false scan from pivot towards tail.
      Returns:
      returns a Holder of this scan. This Resource should be released if scan ended prematurely.
    • storeBeforeCeiling

      IObjectInfo<T> storeBeforeCeiling(IObjectInfo<T> ceiling, T subject)
      Given an ObjectInfo of an existing element, store a new element right "before" this one (towards the tail). This Method used in OrderedIndex object when the MasterList reflects the order of elements: head is the largest, tail the smallest in value. [Tail] - .. - [beforeCeiling] - [newOi] - [ceiling] - .. - [Head]
      Parameters:
      ceiling - a ceiling to the new element (towards the head); when null, the ceiling will be the Head.
      subject - a new element, to be inserted before the ceiling (towards the tail)
      Returns:
      an information node representing the inserted element.

      Note: not relevant for random scans

      Throws:
      RuntimeException - if ceiling was already deleted
    • getLargerInOrder

      IObjectInfo<T> getLargerInOrder(IObjectInfo<T> ref)
      In an ordered , get the element larger than ref.
      Parameters:
      ref - a reference to an OI (element in the )
      Returns:
      the next largest element to ref (towards head)
    • getSmallerInOrder

      IObjectInfo<T> getSmallerInOrder(IObjectInfo<T> ref)
      In an ordered , get the element smaller than ref.
      Parameters:
      ref - a reference to an OI (element in the )
      Returns:
      the next smallest to ref (towards tail)