Interface XOrderingEnum<E>

All Superinterfaces:
ExtendedCollection<E>, ExtendedSequence<E>, XOrderingSequence<E>
All Known Subinterfaces:
XDecreasingEnum<E>, XEnum<E>, XIncreasingEnum<E>, XReference<E>, XSettingEnum<E>, XSortableEnum<E>, XTable<K,​V>, XTable.Keys<K,​V>
All Known Implementing Classes:
EqHashEnum, EqHashTable, EqHashTable.Keys, HashEnum, HashTable, HashTable.Keys, LinkReference.Default, Single, Singleton

public interface XOrderingEnum<E>
extends XOrderingSequence<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
    XOrderingEnum<E> reverse()
    Reverses the order of its own elements and returns itself.
    XOrderingEnum<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.
    XOrderingEnum<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.
    XOrderingEnum<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.
    XOrderingEnum<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.
    XOrderingEnum<E> swap​(long indexA, long indexB)  
    XOrderingEnum<E> swap​(long indexA, long indexB, long length)  

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

    hasVolatileElements, nullAllowed
  • Method Details

    • shiftTo

      XOrderingEnum<E> shiftTo​(long sourceIndex, long targetIndex)
      Description copied from interface: XOrderingSequence
      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.

      Specified by:
      shiftTo in interface XOrderingSequence<E>
      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

      XOrderingEnum<E> shiftTo​(long sourceIndex, long targetIndex, long length)
      Description copied from interface: XOrderingSequence
      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.

      Specified by:
      shiftTo in interface XOrderingSequence<E>
      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

      XOrderingEnum<E> shiftBy​(long sourceIndex, long distance)
      Description copied from interface: XOrderingSequence
      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.

      Specified by:
      shiftBy in interface XOrderingSequence<E>
      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

      XOrderingEnum<E> shiftBy​(long sourceIndex, long distance, long length)
      Description copied from interface: XOrderingSequence
      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.

      Specified by:
      shiftBy in interface XOrderingSequence<E>
      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

      XOrderingEnum<E> swap​(long indexA, long indexB)
      Specified by:
      swap in interface XOrderingSequence<E>
    • swap

      XOrderingEnum<E> swap​(long indexA, long indexB, long length)
      Specified by:
      swap in interface XOrderingSequence<E>
    • reverse

      XOrderingEnum<E> reverse()
      Description copied from interface: XOrderingSequence
      Reverses the order of its own elements and returns itself.
      Specified by:
      reverse in interface XOrderingSequence<E>
      Returns:
      this