Interface XGettingSequence<E>
- All Superinterfaces:
CapacityCarrying
,Copyable
,ExtendedCollection<E>
,ExtendedSequence<E>
,Iterable<E>
,Sized
,XGettingCollection<E>
,XIndexIterable<E>
,XIterable<E>
,XJoinable<E>
- All Known Subinterfaces:
XBasicEnum<E>
,XBasicList<E>
,XBasicSequence<E>
,XBasicTable<K,V>
,XBasicTable.Keys<K,V>
,XBasicTable.Values<K,V>
,XChart<K,V>
,XChart.Keys<K,V>
,XChart.Values<K,V>
,XDecreasingEnum<E>
,XDecreasingList<E>
,XDecreasingSequence<E>
,XEnum<E>
,XGettingEnum<E>
,XGettingList<E>
,XGettingSortation<E>
,XGettingTable<K,V>
,XGettingTable.Keys<K,V>
,XGettingTable.Values<K,V>
,XImmutableEnum<E>
,XImmutableEnum.Factory<E>
,XImmutableList<E>
,XImmutableSequence<E>
,XImmutableTable<K,V>
,XImmutableTable.Keys<K,V>
,XImmutableTable.Values<K,V>
,XIncreasingEnum<E>
,XIncreasingList<E>
,XIncreasingSequence<E>
,XLadder<E>
,XList<E>
,XProcessingEnum<E>
,XProcessingList<E>
,XProcessingSequence<E>
,XProcessingSortation<E>
,XPutGetEnum<E>
,XPutGetList<E>
,XPutGetSequence<E>
,XPutGetSortation<E>
,XRank<E>
,XReference<E>
,XReferencing<E>
,XSequence<E>
,XSettingEnum<E>
,XSettingList<E>
,XSettingSequence<E>
,XSortableEnum<E>
,XSortableSequence<E>
,XSortation<E>
,XTable<K,V>
,XTable.Keys<K,V>
,XTable.Values<K,V>
- All Known Implementing Classes:
ArrayAccessor
,ArrayCollector
,ArrayView
,BulkList
,Constant
,ConstHashEnum
,ConstHashTable
,ConstHashTable.Keys
,ConstHashTable.Values
,ConstLinearEnum
,ConstList
,Empty
,EmptyTable
,EnumProcessor
,EnumView
,EqBulkList
,EqConstHashEnum
,EqConstHashTable
,EqConstHashTable.Keys
,EqConstHashTable.Values
,EqConstList
,EqHashEnum
,EqHashTable
,EqHashTable.Keys
,EqHashTable.Values
,FixedList
,HashEnum
,HashTable
,HashTable.Keys
,HashTable.Values
,LimitList
,LinkingReferencing.Default
,LinkReference.Default
,ListAccessor
,ListProcessor
,ListView
,LockedList
,MappedList
,Single
,Singleton
,SingletonView
,SubCollector
,SubList
,SubListAccessor
,SubListProcessor
,SubListView
,SubProcessor
,SubView
,SynchList
,TableView
public interface XGettingSequence<E> extends XGettingCollection<E>, ExtendedSequence<E>, XIndexIterable<E>
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
XGettingSequence.Factory<E>
Nested classes/interfaces inherited from interface one.microstream.collections.interfaces.ExtendedCollection
ExtendedCollection.Creator<E,C extends ExtendedCollection<E>>
Nested classes/interfaces inherited from interface one.microstream.collections.types.XGettingCollection
XGettingCollection.Creator<E>
Nested classes/interfaces inherited from interface one.microstream.collections.types.XIterable
XIterable.Executor<E>
-
Method Summary
Modifier and Type Method Description E
at(long index)
XGettingSequence<E>
copy()
Creates a true copy of this list which references th same elements in the same order as this list does at the time the method is called.<T extends Consumer<? super E>>
TcopySelection(T target, long... indices)
E
first()
E
get()
Gets the first element in the collection.default boolean
hasIndex(long index)
Equivalent to "contains index".XImmutableSequence<E>
immure()
Provides an instance of an immutable collection type with equal behavior and data as this instance.long
indexBy(Predicate<? super E> predicate)
long
indexOf(E element)
boolean
isSorted(Comparator<? super E> comparator)
E
last()
long
lastIndexBy(Predicate<? super E> predicate)
long
lastIndexOf(E element)
long
maxIndex(Comparator<? super E> comparator)
long
minIndex(Comparator<? super E> comparator)
E
peek()
E
poll()
XGettingSequence<E>
range(long lowIndex, long highIndex)
long
scan(Predicate<? super E> predicate)
Iterates through the collection and returns the index of the last element that the passedPredicate
applied to ("scanning").XGettingSequence<E>
toReversed()
XGettingSequence<E>
view()
XGettingSequence<E>
view(long lowIndex, long highIndex)
Methods inherited from interface one.microstream.collections.interfaces.CapacityCarrying
isFull, maximumCapacity, remainingCapacity
Methods inherited from interface one.microstream.collections.interfaces.ExtendedCollection
nullAllowed
Methods 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, union
-
Method Details
-
copy
XGettingSequence<E> copy()Creates a true copy of this list which references th same elements in the same order as this list does at the time the method is called. The elements themselves are NOT copied (no deep copying).
The type of the returned list is the same as of this list if possible (i.e.: a SubList can not meaningful return a true copy that references its elements but still is a SubList)- Specified by:
copy
in interfaceCopyable
- Specified by:
copy
in interfaceXGettingCollection<E>
- Returns:
- a copy of this list
-
immure
XImmutableSequence<E> immure()Provides an instance of an immutable collection type with equal behavior and data as this instance.If this instance already is of an immutable collection type, it returns itself.
- Specified by:
immure
in interfaceXGettingCollection<E>
- Returns:
- an immutable copy of this collection instance.
-
get
Gets the first element in the collection. This is a parameterless alias vorat(0)
.first() is an alias for this method for consistency reasons with last()
.- Specified by:
get
in interfaceXGettingCollection<E>
- Returns:
- the first element.
- Throws:
NoSuchElementException
- See Also:
at(long)
,first()
,last()
-
at
- Throws:
IndexBoundsException
-
hasIndex
default boolean hasIndex(long index)Equivalent to "contains index". Compare:XGettingTable
table with table.keys().contains(index)- Parameters:
index
-- Returns:
- true if the passed index is greater or equal to 0,
XGettingCollection.size()
is greater than the passed index andat(long)
returns a non-null value.
-
first
- Throws:
IndexBoundsException
-
last
- Throws:
IndexBoundsException
-
poll
E poll() -
peek
E peek() -
maxIndex
-
minIndex
-
indexOf
-
indexBy
-
lastIndexOf
-
lastIndexBy
-
scan
Iterates through the collection and returns the index of the last element that the passedPredicate
applied to ("scanning").- Parameters:
predicate
-- Returns:
- the index of the last positively tested element.
-
isSorted
-
toReversed
XGettingSequence<E> toReversed() -
copySelection
-
view
XGettingSequence<E> view()- Specified by:
view
in interfaceXGettingCollection<E>
-
view
-
range
-