public interface XSortableSequence<E> extends XGettingSequence<E>, Sortable<E>, XOrderingSequence<E>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
XSortableSequence.Creator<E> |
XGettingSequence.Factory<E>Copyable.StaticXIterable.Executor<E>| Modifier and Type | Method and Description |
|---|---|
XSortableSequence<E> |
copy()
Creates a true copy of this list which references the same elements in the same order as this list does
at the time the method is called.
|
XSortableSequence<E> |
reverse()
Reverses the order of its own elements and returns itself.
|
XSortableSequence<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. |
XSortableSequence<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. |
XSortableSequence<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. |
XSortableSequence<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. |
XSortableSequence<E> |
sort(Comparator<? super E> comparator)
Sorts this collection according to the given comparator
and returns itself.
|
XSortableSequence<E> |
swap(long indexA,
long indexB) |
XSortableSequence<E> |
swap(long indexA,
long indexB,
long length) |
XSortableSequence<E> |
toReversed()
Creates a new
XGettingSequence with the reversed order of elements. |
at, copySelection, first, get, hasIndex, immure, indexBy, indexOf, isSorted, last, lastIndexBy, lastIndexOf, maxIndex, minIndex, peek, poll, range, scan, view, viewapplies, contains, containsAll, containsId, containsSearched, copyTo, count, countBy, distinct, distinct, equality, equals, equals, equalsContent, except, filterTo, hashCode, hasVolatileElements, intersect, intSize, iterator, join, max, min, nullContained, old, search, seek, size, toArray, toArray, unionforEach, spliteratorisFull, maximumCapacity, remainingCapacityiterateIndexednullAllowedXSortableSequence<E> shiftTo(long sourceIndex, long targetIndex)
XOrderingSequenceDoes not expand or shrink the capacity of the sequence.
Throws a IndexExceededException if sourceIndex or targetIndex are
greater than the size of the sequence.
shiftTo in interface XOrderingSequence<E>sourceIndex - points to the source element; Index of the source elementtargetIndex - points to the target element; Index of the target elementXSortableSequence<E> shiftTo(long sourceIndex, long targetIndex, long length)
XOrderingSequenceDoes not expand or shrink the capacity of the sequence.
Throws a IndexExceededException if sourceIndex or targetIndex
exceed the size of the sequence.
shiftTo in interface XOrderingSequence<E>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.XSortableSequence<E> shiftBy(long sourceIndex, long distance)
XOrderingSequenceDoes not expand or shrink the capacity of the sequence.
Throws a IndexExceededException if sourceIndex or targetIndex
(sourceIndex+distance) exceed the size of the sequence.
shiftBy in interface XOrderingSequence<E>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 22XSortableSequence<E> shiftBy(long sourceIndex, long distance, long length)
XOrderingSequenceDoes 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.
shiftBy in interface XOrderingSequence<E>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.XSortableSequence<E> swap(long indexA, long indexB)
swap in interface XOrderingSequence<E>XSortableSequence<E> swap(long indexA, long indexB, long length)
swap in interface XOrderingSequence<E>XSortableSequence<E> reverse()
Unlike the toReversed() method, this method does not create a new collection,
but changes the order of its own elements.
reverse in interface XOrderingSequence<E>XSortableSequence<E> sort(Comparator<? super E> comparator)
SortableXSortableSequence<E> copy()
XGettingSequencecopy in interface Copyablecopy in interface XGettingCollection<E>copy in interface XGettingSequence<E>XSortableSequence<E> toReversed()
XGettingSequence with the reversed order of elements.
This method creates a new collection and does not change the existing collection.
Unlike the reverse() method, this method creates a new collection and does not change the
existing collection.
toReversed in interface XGettingSequence<E>Copyright © 2022 MicroStream Software. All rights reserved.