Interface XOrderingSequence<E>

All Superinterfaces:
ExtendedCollection<E>, ExtendedSequence<E>
All Known Subinterfaces:
XBasicTable.Values<K,​V>, XChart.Values<K,​V>, XDecreasingEnum<E>, XDecreasingList<E>, XDecreasingSequence<E>, XEnum<E>, XIncreasingEnum<E>, XIncreasingList<E>, XIncreasingSequence<E>, XList<E>, XOrderingEnum<E>, XReference<E>, XSequence<E>, XSettingEnum<E>, XSettingList<E>, XSettingSequence<E>, XSortableEnum<E>, XSortableSequence<E>, XTable<K,​V>, XTable.Keys<K,​V>, XTable.Values<K,​V>
All Known Implementing Classes:
ArrayAccessor, ArrayCollector, BulkList, EqBulkList, EqHashEnum, EqHashTable, EqHashTable.Keys, EqHashTable.Values, FixedList, HashEnum, HashTable, HashTable.Keys, HashTable.Values, LimitList, LinkReference.Default, ListAccessor, LockedList, Single, Singleton, SubList, SubListAccessor, SubListProcessor, SynchList

public interface XOrderingSequence<E>
extends ExtendedSequence<E>
  • Nested Class Summary

    Nested classes/interfaces inherited from interface one.microstream.collections.interfaces.ExtendedCollection

    ExtendedCollection.Creator<E,​C extends ExtendedCollection<E>>
  • Method Summary

    Modifier and Type Method Description
    XOrderingSequence<E> reverse()
    Reverses the order of its own elements and returns itself.
    XOrderingSequence<E> shiftBy​(long sourceIndex, long distance)
    Moves the element from the sourceIndex in the sequence to a higher index position.
    All other elements are possibly moved to create the empty slot for the shifting element.
    XOrderingSequence<E> shiftBy​(long sourceIndex, long distance, long length)
    Moves multiple elements from the sourceIndex in the sequence to a higher index position.
    All other elements are possibly moved to create the empty slot for the shifting elements.
    XOrderingSequence<E> shiftTo​(long sourceIndex, long targetIndex)
    Moves the element from the sourceIndex in the sequence to the targetIndex.
    All other elements are possibly moved to create the empty slot for the shifting element.
    XOrderingSequence<E> shiftTo​(long sourceIndex, long targetIndex, long length)
    Moves multiple elements from the sourceIndex in the sequence to the targetIndex.
    All other elements are possibly moved to create the empty slot for the shifting element.
    XOrderingSequence<E> swap​(long indexA, long indexB)  
    XOrderingSequence<E> swap​(long indexA, long indexB, long length)  

    Methods inherited from interface one.microstream.collections.interfaces.ExtendedCollection

    hasVolatileElements, nullAllowed
  • Method Details

    • shiftTo

      XOrderingSequence<E> shiftTo​(long sourceIndex, long targetIndex)
      Moves the element from the sourceIndex in the sequence to the targetIndex.
      All other elements are possibly moved to create the empty slot for the shifting element.

      Does not expand or shrink the capacity of the sequence.

      Throws a IndexExceededException if sourceIndex or targetIndex are greater than the size of the sequence.

      Parameters:
      sourceIndex - points to the source element; Index of the source element
      targetIndex - points to the target element; Index of the target element
      Returns:
      this
    • shiftTo

      XOrderingSequence<E> shiftTo​(long sourceIndex, long targetIndex, long length)
      Moves multiple elements from the sourceIndex in the sequence to the targetIndex.
      All other elements are possibly moved to create the empty slot for the shifting element.

      Does not expand or shrink the capacity of the sequence.

      Throws a IndexExceededException if sourceIndex or targetIndex exceed the size of the sequence.

      Parameters:
      sourceIndex - points to the source element; Index of the source element
      targetIndex - points to the target element; Index of the target element
      length - Amount of moved elements.
      Returns:
      self
    • shiftBy

      XOrderingSequence<E> shiftBy​(long sourceIndex, long distance)
      Moves the element from the sourceIndex in the sequence to a higher index position.
      All other elements are possibly moved to create the empty slot for the shifting element. ("to the right")

      Does not expand or shrink the capacity of the sequence.

      Throws a IndexExceededException if sourceIndex or targetIndex (sourceIndex+distance) exceed the size of the sequence.

      Parameters:
      sourceIndex - points to the source element; Index of the source element
      distance - of how far the element should be moved. Example: 1 moves the element from position 21 to position 22
      Returns:
      self
    • shiftBy

      XOrderingSequence<E> shiftBy​(long sourceIndex, long distance, long length)
      Moves multiple elements from the sourceIndex in the sequence to a higher index position.
      All other elements are possibly moved to create the empty slot for the shifting elements. ("to the right")

      Does not expand or shrink the capacity of the sequence.

      Throws a IndexExceededException if sourceIndex or targetIndex (sourceIndex+distance+length) exceed the size of the sequence.

      Parameters:
      sourceIndex - points to the source element; Index of the source element
      distance - of how far the element should be moved. Example: 1 moves the element from position 21 to position 22
      length - Amount of moved elements.
      Returns:
      self
    • swap

      XOrderingSequence<E> swap​(long indexA, long indexB)
    • swap

      XOrderingSequence<E> swap​(long indexA, long indexB, long length)
    • reverse

      XOrderingSequence<E> reverse()
      Reverses the order of its own elements and returns itself.
      Returns:
      this