Package one.microstream.collections
Class SubListAccessor<E>
- java.lang.Object
-
- one.microstream.collections.SubListView<E>
-
- one.microstream.collections.SubListAccessor<E>
-
- All Implemented Interfaces:
Iterable<E>,CapacityCarrying,ExtendedBag<E>,ExtendedCollection<E>,ExtendedList<E>,ExtendedSequence<E>,ReleasingCollection<E>,Sized,Sortable<E>,XGettingBag<E>,XGettingCollection<E>,XGettingList<E>,XGettingSequence<E>,XIndexIterable<E>,XIterable<E>,XJoinable<E>,XOrderingSequence<E>,XReplacingBag<E>,XReplacingCollection<E>,XSettingList<E>,XSettingSequence<E>,XSortableSequence<E>,Copyable
- Direct Known Subclasses:
SubList
public class SubListAccessor<E> extends SubListView<E> implements XSettingList<E>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface one.microstream.typing.Copyable
Copyable.Static
-
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.XGettingList
XGettingList.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>
-
Nested classes/interfaces inherited from interface one.microstream.collections.types.XReplacingBag
XReplacingBag.Factory<E>
-
Nested classes/interfaces inherited from interface one.microstream.collections.types.XSettingList
XSettingList.Creator<E>
-
-
Constructor Summary
Constructors Constructor Description SubListAccessor(XSettingList<E> list, long fromIndex, long toIndex)
-
Method Summary
Modifier and Type Method Description SubListAccessor<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.SubListAccessor<E>fill(long offset, long length, E element)one.microstream.collections.SubListAccessor.OldSubListAccessor<E>old()SubListAccessor<E>range(long fromIndex, long toIndex)longreplace(E element, E replacement)longreplace(Predicate<? super E> predicate, E substitute)longreplaceAll(XGettingCollection<? extends E> elements, E replacement)booleanreplaceOne(E element, E replacement)booleanreplaceOne(Predicate<? super E> predicate, E substitute)SubListAccessor<E>reverse()booleanset(long index, E element)SubListAccessor<E>set(long offset, E[] src, int srcIndex, int srcLength)SubListAccessor<E>set(long offset, XGettingSequence<? extends E> elements, long elementsOffset, long elementsLength)SubListAccessor<E>setAll(long offset, E... elements)voidsetFirst(E element)EsetGet(long index, E element)voidsetLast(E element)SubListAccessor<E>shiftBy(long sourceIndex, long distance)SubListAccessor<E>shiftBy(long sourceIndex, long distance, long length)SubListAccessor<E>shiftTo(long sourceIndex, long targetIndex)SubListAccessor<E>shiftTo(long sourceIndex, long targetIndex, long length)SubListAccessor<E>sort(Comparator<? super E> comparator)longsubstitute(Function<? super E,? extends E> mapper)longsubstitute(Predicate<? super E> predicate, Function<E,E> mapper)SubListAccessor<E>swap(long indexA, long indexB)SubListAccessor<E>swap(long indexA, long indexB, long length)SubListAccessor<E>toReversed()SubListView<E>view(long fromIndex, long toIndex)-
Methods inherited from class one.microstream.collections.SubListView
applies, at, contains, containsAll, containsId, containsSearched, copySelection, copyTo, count, countBy, distinct, distinct, equality, equals, equalsContent, except, filterTo, first, get, getEndIndex, hasVolatileElements, immure, indexBy, indexOf, intersect, isEmpty, isFull, isSorted, iterate, iterateIndexed, iterator, join, last, lastIndexBy, lastIndexOf, listIterator, listIterator, max, maximumCapacity, maxIndex, min, minIndex, nullAllowed, nullContained, peek, poll, remainingCapacity, scan, search, seek, size, toArray, toArray, union, view
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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 java.lang.Iterable
forEach, spliterator
-
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, search, seek, size, toArray, toArray, union
-
Methods inherited from interface one.microstream.collections.types.XGettingList
immure, listIterator, listIterator, view
-
Methods inherited from interface one.microstream.collections.types.XGettingSequence
at, copySelection, first, get, hasIndex, indexBy, indexOf, isSorted, last, lastIndexBy, lastIndexOf, maxIndex, minIndex, peek, poll, scan
-
Methods inherited from interface one.microstream.collections.types.XIndexIterable
iterateIndexed
-
-
-
-
Constructor Detail
-
SubListAccessor
public SubListAccessor(XSettingList<E> list, long fromIndex, long toIndex)
-
-
Method Detail
-
replace
public long replace(E element, E replacement)
- Specified by:
replacein interfaceXReplacingBag<E>
-
replaceOne
public boolean replaceOne(E element, E replacement)
- Specified by:
replaceOnein interfaceXReplacingBag<E>
-
substitute
public long substitute(Function<? super E,? extends E> mapper)
- Specified by:
substitutein interfaceXReplacingCollection<E>
-
substitute
public long substitute(Predicate<? super E> predicate, Function<E,E> mapper)
- Specified by:
substitutein interfaceXReplacingBag<E>
-
range
public SubListAccessor<E> range(long fromIndex, long toIndex)
- Specified by:
rangein interfaceXGettingList<E>- Specified by:
rangein interfaceXGettingSequence<E>- Specified by:
rangein interfaceXSettingList<E>- Specified by:
rangein interfaceXSettingSequence<E>- Overrides:
rangein classSubListView<E>
-
fill
public SubListAccessor<E> fill(long offset, long length, E element)
- Specified by:
fillin interfaceXSettingList<E>
-
replaceOne
public boolean replaceOne(Predicate<? super E> predicate, E substitute)
- Specified by:
replaceOnein interfaceXReplacingBag<E>
-
reverse
public SubListAccessor<E> reverse()
- Specified by:
reversein interfaceXOrderingSequence<E>- Specified by:
reversein interfaceXSettingList<E>- Specified by:
reversein interfaceXSettingSequence<E>- Specified by:
reversein interfaceXSortableSequence<E>
-
setAll
public SubListAccessor<E> setAll(long offset, E... elements)
- Specified by:
setAllin interfaceXSettingList<E>- Specified by:
setAllin interfaceXSettingSequence<E>
-
set
public SubListAccessor<E> set(long offset, E[] src, int srcIndex, int srcLength)
- Specified by:
setin interfaceXSettingList<E>- Specified by:
setin interfaceXSettingSequence<E>
-
set
public SubListAccessor<E> set(long offset, XGettingSequence<? extends E> elements, long elementsOffset, long elementsLength)
- Specified by:
setin interfaceXSettingList<E>- Specified by:
setin interfaceXSettingSequence<E>
-
setFirst
public void setFirst(E element)
- Specified by:
setFirstin interfaceXSettingSequence<E>
-
setLast
public void setLast(E element)
- Specified by:
setLastin interfaceXSettingSequence<E>
-
sort
public SubListAccessor<E> sort(Comparator<? super E> comparator)
- Specified by:
sortin interfaceSortable<E>- Specified by:
sortin interfaceXSettingList<E>- Specified by:
sortin interfaceXSettingSequence<E>- Specified by:
sortin interfaceXSortableSequence<E>
-
shiftTo
public SubListAccessor<E> shiftTo(long sourceIndex, long targetIndex)
- Specified by:
shiftToin interfaceXOrderingSequence<E>- Specified by:
shiftToin interfaceXSortableSequence<E>
-
shiftTo
public SubListAccessor<E> shiftTo(long sourceIndex, long targetIndex, long length)
- Specified by:
shiftToin interfaceXOrderingSequence<E>- Specified by:
shiftToin interfaceXSortableSequence<E>
-
shiftBy
public SubListAccessor<E> shiftBy(long sourceIndex, long distance)
- Specified by:
shiftByin interfaceXOrderingSequence<E>- Specified by:
shiftByin interfaceXSortableSequence<E>
-
shiftBy
public SubListAccessor<E> shiftBy(long sourceIndex, long distance, long length)
- Specified by:
shiftByin interfaceXOrderingSequence<E>- Specified by:
shiftByin interfaceXSortableSequence<E>
-
swap
public SubListAccessor<E> swap(long indexA, long indexB)
- Specified by:
swapin interfaceXOrderingSequence<E>- Specified by:
swapin interfaceXSettingList<E>- Specified by:
swapin interfaceXSettingSequence<E>- Specified by:
swapin interfaceXSortableSequence<E>
-
swap
public SubListAccessor<E> swap(long indexA, long indexB, long length)
- Specified by:
swapin interfaceXOrderingSequence<E>- Specified by:
swapin interfaceXSettingList<E>- Specified by:
swapin interfaceXSettingSequence<E>- Specified by:
swapin interfaceXSortableSequence<E>
-
replace
public long replace(Predicate<? super E> predicate, E substitute)
- Specified by:
replacein interfaceXReplacingBag<E>
-
replaceAll
public long replaceAll(XGettingCollection<? extends E> elements, E replacement)
- Specified by:
replaceAllin interfaceXReplacingBag<E>
-
set
public boolean set(long index, E element)- Specified by:
setin interfaceXSettingSequence<E>
-
setGet
public E setGet(long index, E element)
- Specified by:
setGetin interfaceXSettingSequence<E>
-
view
public SubListView<E> view(long fromIndex, long toIndex)
- Specified by:
viewin interfaceXGettingList<E>- Specified by:
viewin interfaceXGettingSequence<E>- Overrides:
viewin classSubListView<E>
-
toReversed
public SubListAccessor<E> toReversed()
- Specified by:
toReversedin interfaceXGettingList<E>- Specified by:
toReversedin interfaceXGettingSequence<E>- Specified by:
toReversedin interfaceXSettingList<E>- Specified by:
toReversedin interfaceXSettingSequence<E>- Specified by:
toReversedin interfaceXSortableSequence<E>- Overrides:
toReversedin classSubListView<E>
-
copy
public SubListAccessor<E> copy()
Description copied from interface:XGettingSequenceCreates 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:
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 interfaceXReplacingBag<E>- Specified by:
copyin interfaceXSettingList<E>- Specified by:
copyin interfaceXSettingSequence<E>- Specified by:
copyin interfaceXSortableSequence<E>- Overrides:
copyin classSubListView<E>- Returns:
- a copy of this list
-
old
public one.microstream.collections.SubListAccessor.OldSubListAccessor<E> old()
- Specified by:
oldin interfaceXGettingCollection<E>- Specified by:
oldin interfaceXGettingList<E>- Overrides:
oldin classSubListView<E>
-
-