Interface XImmutableList<E>
- All Superinterfaces:
CapacityCarrying,Copyable,ExtendedBag<E>,ExtendedCollection<E>,ExtendedList<E>,ExtendedSequence<E>,HashImmutable,Immutable,Iterable<E>,Sized,ThreadSafe,XGettingBag<E>,XGettingCollection<E>,XGettingList<E>,XGettingSequence<E>,XImmutableBag<E>,XImmutableCollection<E>,XImmutableSequence<E>,XIndexIterable<E>,XIterable<E>,XJoinable<E>
- All Known Subinterfaces:
XImmutableTable.Values<K,V>
- All Known Implementing Classes:
Constant,ConstHashTable.Values,ConstList,Empty,EqConstHashTable.Values,EqConstList,LinkingReferencing.Default
public interface XImmutableList<E> extends XImmutableSequence<E>, XImmutableBag<E>, XGettingList<E>
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceXImmutableList.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 XImmutableList<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.XImmutableList<E>immure()Always returns the already immutable collection instance itselfXImmutableList<E>range(long fromIndex, long toIndex)XImmutableList<E>toReversed()Creates a newXGettingSequencewith the reversed order of elements.XImmutableList<E>view()Creates a view of this collection and returns it.XImmutableList<E>view(long lowIndex, long highIndex)Creates a sub-view of this collection and returns it.Methods inherited from interface one.microstream.collections.interfaces.CapacityCarrying
isFull, maximumCapacity, remainingCapacityMethods inherited from interface one.microstream.collections.interfaces.ExtendedCollection
nullAllowedMethods 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, search, seek, size, toArray, toArray, unionMethods inherited from interface one.microstream.collections.types.XGettingList
listIterator, listIterator, oldMethods inherited from interface one.microstream.collections.types.XGettingSequence
at, copySelection, first, get, hasIndex, indexBy, indexOf, isSorted, last, lastIndexBy, lastIndexOf, maxIndex, minIndex, peek, poll, scan
-
Method Details
-
copy
XImmutableList<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 interfaceXGettingBag<E>- Specified by:
copyin interfaceXGettingCollection<E>- Specified by:
copyin interfaceXGettingList<E>- Specified by:
copyin interfaceXGettingSequence<E>- Specified by:
copyin interfaceXImmutableBag<E>- Specified by:
copyin interfaceXImmutableCollection<E>- Specified by:
copyin interfaceXImmutableSequence<E>- Returns:
- a copy of this list
-
immure
XImmutableList<E> immure()Always returns the already immutable collection instance itselfFor spawning a copy of the collection instance, see
XImmutableCollection.copy()- Specified by:
immurein interfaceXGettingBag<E>- Specified by:
immurein interfaceXGettingCollection<E>- Specified by:
immurein interfaceXGettingList<E>- Specified by:
immurein interfaceXGettingSequence<E>- Specified by:
immurein interfaceXImmutableBag<E>- Specified by:
immurein interfaceXImmutableCollection<E>- Specified by:
immurein interfaceXImmutableSequence<E>- Returns:
- a reference to the instance itself.
- See Also:
XImmutableCollection.copy()
-
toReversed
XImmutableList<E> 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 interfaceXGettingList<E>- Specified by:
toReversedin interfaceXGettingSequence<E>- Specified by:
toReversedin interfaceXImmutableSequence<E>- Returns:
- New copy of the collection
-
range
- Specified by:
rangein interfaceXGettingList<E>- Specified by:
rangein interfaceXGettingSequence<E>
-
view
XImmutableList<E> view()Description copied from interface:XGettingCollectionCreates a view of this collection and returns it. It is a read-only collection, which wraps around this collection and only allows read methods.A view is different from immutable collection (
XGettingCollection.immure()) in the way, that changes in this collection are still affecting the view. The immutable collection on the other hand has no reference to this collection and changes therefore do not affect the immutable collection.- Specified by:
viewin interfaceXGettingBag<E>- Specified by:
viewin interfaceXGettingCollection<E>- Specified by:
viewin interfaceXGettingList<E>- Specified by:
viewin interfaceXGettingSequence<E>- Returns:
- new read-only collection to view this collection
-
view
Description copied from interface:XGettingSequenceCreates a sub-view of this collection and returns it. It is a read-only collection, which wraps around this collection and only allows read methods.
The view is limited to a range from the lowIndex to the highIndex.A view is different from immutable collection (
XGettingCollection.immure()) in the way, that changes in this collection are still affecting the view. The immutable collection on the other hand has no reference to this collection and changes therefore do not affect the immutable collection.- Specified by:
viewin interfaceXGettingList<E>- Specified by:
viewin interfaceXGettingSequence<E>- Parameters:
lowIndex- defines lower boundary for the view of the collection.highIndex- defines higher boundary for the view of the collection.- Returns:
- new read-only collection to view a range of elements in this collection
-