Interface XSequence<E>
- All Superinterfaces:
CapacityCarrying,CapacityExtendable,Clearable,ConsolidatableCollection,Consumer<E>,Copyable,ExtendedCollection<E>,ExtendedSequence<E>,Iterable<E>,OptimizableCollection,Processable<E>,ReleasingCollection<E>,Sized,Sortable<E>,Truncateable,XAddGetCollection<E>,XAddingCollection<E>,XAddingSequence<E>,XBasicSequence<E>,XCollection<E>,XExpandingSequence<E>,XExtendingSequence<E>,XGettingCollection<E>,XGettingSequence<E>,XIndexIterable<E>,XInputtingSequence<E>,XInsertingSequence<E>,XIterable<E>,XJoinable<E>,XOrderingSequence<E>,XPrependingSequence<E>,XPreputtingSequence<E>,XProcessingCollection<E>,XProcessingSequence<E>,XPutGetCollection<E>,XPutGetSequence<E>,XPuttingCollection<E>,XPuttingSequence<E>,XRemovingCollection<E>,XRemovingSequence<E>,XSortableSequence<E>
- All Known Subinterfaces:
XEnum<E>,XList<E>,XTable<K,V>,XTable.Keys<K,V>
- All Known Implementing Classes:
ArrayCollector,BulkList,EqBulkList,EqHashEnum,EqHashTable,EqHashTable.Keys,HashEnum,HashTable,HashTable.Keys,LimitList,LockedList,Single,SubList,SynchList
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.
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceXSequence.Creator<E>Nested classes/interfaces inherited from interface one.microstream.collections.types.XBasicSequence
XBasicSequence.Factory<E>Nested classes/interfaces inherited from interface one.microstream.collections.types.XGettingSequence
XGettingSequence.Factory<E>Nested classes/interfaces inherited from interface one.microstream.collections.types.XIterable
XIterable.Executor<E> -
Method Summary
Modifier and Type Method 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 newXGettingSequencewith the reversed order of elements.Methods inherited from interface one.microstream.collections.interfaces.CapacityCarrying
isFull, maximumCapacity, remainingCapacityMethods inherited from interface one.microstream.collections.interfaces.CapacityExtendable
currentCapacity, currentFreeCapacity, ensureCapacity, ensureFreeCapacityMethods inherited from interface one.microstream.collections.interfaces.ExtendedCollection
nullAllowedMethods inherited from interface one.microstream.collections.types.XAddingCollection
accept, add, nullAddMethods inherited from interface one.microstream.collections.types.XGettingCollection
applies, 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, unionMethods inherited from interface one.microstream.collections.types.XGettingSequence
at, copySelection, first, get, hasIndex, immure, indexBy, indexOf, isSorted, last, lastIndexBy, lastIndexOf, maxIndex, minIndex, peek, poll, range, scan, viewMethods inherited from interface one.microstream.collections.types.XInputtingSequence
input, inputAll, inputAll, inputAll, nullInput, prependAll, prependAll, prependAll, preputAll, preputAll, preputAllMethods inherited from interface one.microstream.collections.types.XInsertingSequence
insert, insertAll, insertAll, insertAll, nullInsertMethods inherited from interface one.microstream.collections.types.XPrependingSequence
nullPrepend, prependMethods inherited from interface one.microstream.collections.types.XPreputtingSequence
nullPreput, preputMethods inherited from interface one.microstream.collections.types.XProcessingCollection
fetch, iterate, moveTo, pinch, removeBy, removeDuplicates, retrieve, retrieveByMethods inherited from interface one.microstream.collections.types.XProcessingSequence
moveSelection, pick, pop, removeAt, viewMethods inherited from interface one.microstream.collections.types.XRemovingCollection
clear, consolidate, nullRemove, optimize, remove, removeAll, removeDuplicates, removeOne, retainAll, truncateMethods inherited from interface one.microstream.collections.types.XRemovingSequence
removeRange, removeSelection, retainRange
-
Method Details
-
putAll
Description copied from interface:XPuttingCollectionAdds the specified elements to this collection if it is not already present (optional operation).- Specified by:
putAllin interfaceXBasicSequence<E>- Specified by:
putAllin interfaceXCollection<E>- Specified by:
putAllin interfaceXExpandingSequence<E>- Specified by:
putAllin interfaceXInputtingSequence<E>- Specified by:
putAllin interfaceXPutGetCollection<E>- Specified by:
putAllin interfaceXPutGetSequence<E>- Specified by:
putAllin interfaceXPuttingCollection<E>- Specified by:
putAllin interfaceXPuttingSequence<E>- Parameters:
elements- to add- Returns:
- this
-
putAll
Description copied from interface:XPuttingCollectionAdds 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.- Specified by:
putAllin interfaceXBasicSequence<E>- Specified by:
putAllin interfaceXCollection<E>- Specified by:
putAllin interfaceXExpandingSequence<E>- Specified by:
putAllin interfaceXInputtingSequence<E>- Specified by:
putAllin interfaceXPutGetCollection<E>- Specified by:
putAllin interfaceXPutGetSequence<E>- Specified by:
putAllin interfaceXPuttingCollection<E>- Specified by:
putAllin interfaceXPuttingSequence<E>- Parameters:
elements- to addsrcStartIndex- start index of elements-array to add to collectionsrcLength- length of elements-array to add to collection- Returns:
- this
-
putAll
Description copied from interface:XPuttingCollectionAdds the specified elements to this collection if it is not already present (optional operation).- Specified by:
putAllin interfaceXBasicSequence<E>- Specified by:
putAllin interfaceXCollection<E>- Specified by:
putAllin interfaceXExpandingSequence<E>- Specified by:
putAllin interfaceXInputtingSequence<E>- Specified by:
putAllin interfaceXPutGetCollection<E>- Specified by:
putAllin interfaceXPutGetSequence<E>- Specified by:
putAllin interfaceXPuttingCollection<E>- Specified by:
putAllin interfaceXPuttingSequence<E>- Parameters:
elements- to add- Returns:
- this
-
addAll
- Specified by:
addAllin interfaceXAddGetCollection<E>- Specified by:
addAllin interfaceXAddingCollection<E>- Specified by:
addAllin interfaceXAddingSequence<E>- Specified by:
addAllin interfaceXBasicSequence<E>- Specified by:
addAllin interfaceXCollection<E>- Specified by:
addAllin interfaceXExpandingSequence<E>- Specified by:
addAllin interfaceXExtendingSequence<E>- Specified by:
addAllin interfaceXInputtingSequence<E>- Specified by:
addAllin interfaceXInsertingSequence<E>- Specified by:
addAllin interfaceXPutGetCollection<E>- Specified by:
addAllin interfaceXPutGetSequence<E>
-
addAll
- Specified by:
addAllin interfaceXAddGetCollection<E>- Specified by:
addAllin interfaceXAddingCollection<E>- Specified by:
addAllin interfaceXAddingSequence<E>- Specified by:
addAllin interfaceXBasicSequence<E>- Specified by:
addAllin interfaceXCollection<E>- Specified by:
addAllin interfaceXExpandingSequence<E>- Specified by:
addAllin interfaceXExtendingSequence<E>- Specified by:
addAllin interfaceXInputtingSequence<E>- Specified by:
addAllin interfaceXInsertingSequence<E>- Specified by:
addAllin interfaceXPutGetCollection<E>- Specified by:
addAllin interfaceXPutGetSequence<E>
-
addAll
- Specified by:
addAllin interfaceXAddGetCollection<E>- Specified by:
addAllin interfaceXAddingCollection<E>- Specified by:
addAllin interfaceXAddingSequence<E>- Specified by:
addAllin interfaceXBasicSequence<E>- Specified by:
addAllin interfaceXCollection<E>- Specified by:
addAllin interfaceXExpandingSequence<E>- Specified by:
addAllin interfaceXExtendingSequence<E>- Specified by:
addAllin interfaceXInputtingSequence<E>- Specified by:
addAllin interfaceXInsertingSequence<E>- Specified by:
addAllin interfaceXPutGetCollection<E>- Specified by:
addAllin interfaceXPutGetSequence<E>
-
copy
Description copied from interface:XGettingCollectionCreates a true copy of this collection which references the same elements as this collection does at the time the method is called. The elements themselves are NOT copied (no deep copying).
The type of the returned set is the same as of this list if possible.- Specified by:
copyin interfaceCopyable- Specified by:
copyin interfaceXAddGetCollection<E>- Specified by:
copyin interfaceXBasicSequence<E>- Specified by:
copyin interfaceXCollection<E>- Specified by:
copyin interfaceXGettingCollection<E>- Specified by:
copyin interfaceXGettingSequence<E>- Specified by:
copyin interfaceXPutGetCollection<E>- Specified by:
copyin interfaceXPutGetSequence<E>- Specified by:
copyin interfaceXSortableSequence<E>- Returns:
- a copy of this list
-
toReversed
Description copied from interface:XGettingSequenceCreates a newXGettingSequencewith the reversed order of elements.This method creates a new collection and does not change the existing collection.
- Specified by:
toReversedin interfaceXBasicSequence<E>- Specified by:
toReversedin interfaceXGettingSequence<E>- Specified by:
toReversedin interfaceXProcessingSequence<E>- Specified by:
toReversedin interfaceXPutGetSequence<E>- Specified by:
toReversedin interfaceXSortableSequence<E>- Returns:
- New copy of the collection
-
sort
Description copied from interface:SortableSorts this collection according to the given comparator and returns itself.
-