public interface XSequence<E> extends XBasicSequence<E>, XSortableSequence<E>, XInputtingSequence<E>
Being ordered is defined as: An procedure affecting one element does not affect the order of all other elements. Note that being ordered is not the same as being sorted. Being ordered only defines that there has to be a stable order, while being sorted defines that the order is not only stable but also complies to a certain sorting logic.
The concept of being ordered introduces the concept of indexed element accessing as a consequence.
Sequence type collections are architectural on par with the other level 1 collection types set and bag.
Currently existing subtypes of sequence (level 2 collection types) are list (combining sequence and bag), enum (combining sequence and set) and sortation (enhancing the contract from being ordered to being sorted).
Note that all collection types not being a subtype of sequence (like pure set and pure bag subtypes) are rather academic and most probably only reasonably usable for high end performance optimisations. This effectively makes the sequence the dominant level 1 collection type, almost superseding the level 0 collection type collection in practice.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
XSequence.Creator<E> |
XBasicSequence.Factory<E>| Modifier and Type | Method and Description |
|---|---|
XSequence<E> |
addAll(E... elements) |
XSequence<E> |
addAll(E[] elements,
int srcStartIndex,
int srcLength) |
XSequence<E> |
addAll(XGettingCollection<? extends E> elements) |
XSequence<E> |
copy()
Creates a true copy of this collection which references the same elements as this collection does
at the time the method is called.
|
XSequence<E> |
putAll(E... elements)
Adds the specified elements to this collection if it is not already present (optional operation).
|
XSequence<E> |
putAll(E[] elements,
int srcStartIndex,
int srcLength)
Adds the specified elements to this collection if it is not already present (optional operation).
Only the elements with indizes from the srcStartIndex to the srcStartIndex+srcLength are put in the collection. |
XSequence<E> |
putAll(XGettingCollection<? extends E> elements)
Adds the specified elements to this collection if it is not already present (optional operation).
|
XSequence<E> |
sort(Comparator<? super E> comparator)
Sorts this collection according to the given comparator
and returns itself.
|
XSequence<E> |
toReversed()
Creates a new
XGettingSequence with the reversed order of elements. |
collectormoveSelection, pick, pop, removeAt, viewremoveRange, removeSelection, retainRangeat, copySelection, first, get, hasIndex, immure, indexBy, indexOf, isSorted, last, lastIndexBy, lastIndexOf, maxIndex, minIndex, peek, poll, range, scan, viewiterateIndexedfetch, iterate, moveTo, pinch, removeBy, removeDuplicates, retrieve, retrieveByprocessclear, consolidate, nullRemove, optimize, remove, removeAll, removeDuplicates, removeOne, retainAll, truncatereverse, shiftBy, shiftBy, shiftTo, shiftTo, swap, swapinput, inputAll, inputAll, inputAll, nullInput, prependAll, prependAll, prependAll, preputAll, preputAll, preputAllinsert, insertAll, insertAll, insertAll, nullInsertnullPut, putaccept, add, nullAddcurrentCapacity, currentFreeCapacity, ensureCapacity, ensureFreeCapacityisFull, maximumCapacity, remainingCapacitynullPreput, preputnullPrepend, prependnullAllowedXSequence<E> putAll(E... elements)
XPuttingCollectionputAll in interface XBasicSequence<E>putAll in interface XCollection<E>putAll in interface XExpandingSequence<E>putAll in interface XInputtingSequence<E>putAll in interface XPutGetCollection<E>putAll in interface XPutGetSequence<E>putAll in interface XPuttingCollection<E>putAll in interface XPuttingSequence<E>elements - to addXSequence<E> putAll(E[] elements, int srcStartIndex, int srcLength)
XPuttingCollectionputAll in interface XBasicSequence<E>putAll in interface XCollection<E>putAll in interface XExpandingSequence<E>putAll in interface XInputtingSequence<E>putAll in interface XPutGetCollection<E>putAll in interface XPutGetSequence<E>putAll in interface XPuttingCollection<E>putAll in interface XPuttingSequence<E>elements - to addsrcStartIndex - start index of elements-array to add to collectionsrcLength - length of elements-array to add to collectionXSequence<E> putAll(XGettingCollection<? extends E> elements)
XPuttingCollectionputAll in interface XBasicSequence<E>putAll in interface XCollection<E>putAll in interface XExpandingSequence<E>putAll in interface XInputtingSequence<E>putAll in interface XPutGetCollection<E>putAll in interface XPutGetSequence<E>putAll in interface XPuttingCollection<E>putAll in interface XPuttingSequence<E>elements - to addXSequence<E> addAll(E... elements)
addAll in interface XAddGetCollection<E>addAll in interface XAddingCollection<E>addAll in interface XAddingSequence<E>addAll in interface XBasicSequence<E>addAll in interface XCollection<E>addAll in interface XExpandingSequence<E>addAll in interface XExtendingSequence<E>addAll in interface XInputtingSequence<E>addAll in interface XInsertingSequence<E>addAll in interface XPutGetCollection<E>addAll in interface XPutGetSequence<E>XSequence<E> addAll(E[] elements, int srcStartIndex, int srcLength)
addAll in interface XAddGetCollection<E>addAll in interface XAddingCollection<E>addAll in interface XAddingSequence<E>addAll in interface XBasicSequence<E>addAll in interface XCollection<E>addAll in interface XExpandingSequence<E>addAll in interface XExtendingSequence<E>addAll in interface XInputtingSequence<E>addAll in interface XInsertingSequence<E>addAll in interface XPutGetCollection<E>addAll in interface XPutGetSequence<E>XSequence<E> addAll(XGettingCollection<? extends E> elements)
addAll in interface XAddGetCollection<E>addAll in interface XAddingCollection<E>addAll in interface XAddingSequence<E>addAll in interface XBasicSequence<E>addAll in interface XCollection<E>addAll in interface XExpandingSequence<E>addAll in interface XExtendingSequence<E>addAll in interface XInputtingSequence<E>addAll in interface XInsertingSequence<E>addAll in interface XPutGetCollection<E>addAll in interface XPutGetSequence<E>XSequence<E> copy()
XGettingCollectioncopy in interface Copyablecopy in interface XAddGetCollection<E>copy in interface XBasicSequence<E>copy in interface XCollection<E>copy in interface XGettingCollection<E>copy in interface XGettingSequence<E>copy in interface XPutGetCollection<E>copy in interface XPutGetSequence<E>copy in interface XSortableSequence<E>XSequence<E> toReversed()
XGettingSequenceXGettingSequence with the reversed order of elements.
This method creates a new collection and does not change the existing collection.
toReversed in interface XBasicSequence<E>toReversed in interface XGettingSequence<E>toReversed in interface XProcessingSequence<E>toReversed in interface XPutGetSequence<E>toReversed in interface XSortableSequence<E>XSequence<E> sort(Comparator<? super E> comparator)
SortableCopyright © 2022 MicroStream Software. All rights reserved.