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
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 interfaceXOrderingSequence<E>
- Parameters:
sourceIndex
- points to the source element; Index of the source elementtargetIndex
- points to the target element; Index of the target element- Returns:
- this
-
shiftTo
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 interfaceXOrderingSequence<E>
- Parameters:
sourceIndex
- points to the source element; Index of the source elementtargetIndex
- points to the target element; Index of the target elementlength
- Amount of moved elements.- Returns:
- self
-
shiftBy
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 interfaceXOrderingSequence<E>
- Parameters:
sourceIndex
- points to the source element; Index of the source elementdistance
- of how far the element should be moved. Example: 1 moves the element from position 21 to position 22- Returns:
- self
-
shiftBy
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 interfaceXOrderingSequence<E>
- Parameters:
sourceIndex
- points to the source element; Index of the source elementdistance
- of how far the element should be moved. Example: 1 moves the element from position 21 to position 22length
- Amount of moved elements.- Returns:
- self
-
swap
- Specified by:
swap
in interfaceXOrderingSequence<E>
-
swap
- Specified by:
swap
in interfaceXOrderingSequence<E>
-
reverse
XOrderingEnum<E> reverse()Description copied from interface:XOrderingSequence
Reverses the order of its own elements and returns itself.- Specified by:
reverse
in interfaceXOrderingSequence<E>
- Returns:
- this
-