Package one.microstream.collections
Class ChainStorageStrong<E,K,V,EN extends AbstractChainEntry<E,K,V,EN>>
- java.lang.Object
-
- one.microstream.collections.AbstractChainStorage<E,K,V,EN>
-
- one.microstream.collections.ChainStorageStrong<E,K,V,EN>
-
- All Implemented Interfaces:
Iterable<E>
,ChainStorage<E,K,V,EN>
,Composition
- Direct Known Subclasses:
AbstractChainKeyValueStorage
public class ChainStorageStrong<E,K,V,EN extends AbstractChainEntry<E,K,V,EN>> extends AbstractChainStorage<E,K,V,EN>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface one.microstream.collections.interfaces.ChainStorage
ChainStorage.Entry<E,K,V,EN extends ChainStorage.Entry<E,K,V,EN>>
-
-
Constructor Summary
Constructors Constructor Description ChainStorageStrong(AbstractChainCollection<E,K,V,EN> parent, EN head)
-
Method Summary
Modifier and Type Method Description void
appendEntry(EN entry)
VarString
appendTo(VarString vc)
VarString
appendTo(VarString vc, char separator)
VarString
appendTo(VarString vc, String separator)
VarString
appendTo(VarString vc, BiConsumer<VarString,? super E> appender)
VarString
appendTo(VarString vc, BiConsumer<VarString,? super E> appender, char separator)
VarString
appendTo(VarString vc, BiConsumer<VarString,? super E> appender, String separator)
boolean
appliesAll(Predicate<? super E> predicate)
void
clear()
long
consolidate()
Removes all empty entries from the passed chain and returns the number of removed entries.boolean
contains(E element)
boolean
contains(E sample, Equalator<? super E> equalator)
boolean
containsAll(E[] elements, int elementsOffset, int elementsLength)
boolean
containsAll(XGettingCollection<? extends E> elements)
boolean
containsId(E element)
boolean
containsNull()
boolean
containsSearched(Predicate<? super E> predicate)
<C extends Consumer<? super E>>
CcopySelection(C target, long[] indices)
<C extends Consumer<? super E>>
CcopyTo(C target)
<C extends Consumer<? super E>>
CcopyTo(C target, Predicate<? super E> predicate)
int
copyToArray(long offset, int length, Object[] target, int targetOffset)
long
count(E element)
long
count(E sample, Equalator<? super E> equalator)
long
count(Predicate<? super E> predicate)
<C extends Consumer<? super E>>
Cdistinct(C target)
<C extends Consumer<? super E>>
Cdistinct(C target, Equalator<? super E> equalator)
boolean
equalsContent(XGettingCollection<? extends E> other, Equalator<? super E> equalator)
<C extends Consumer<? super E>>
Cexcept(XGettingCollection<? extends E> samples, Equalator<? super E> equalator, C target)
void
fill(long offset, long length, E element)
E
first()
E
get(long index)
EN
getChainEntry(long index)
EN
getIntervalLowChainEntry(long lowIndex, long highIndex)
EN
getRangeChainEntry(long offset, long length)
ReferenceType
getReferenceType()
boolean
hasDistinctValues()
boolean
hasDistinctValues(Equalator<? super E> equalator)
boolean
hasVolatileElements()
long
indexOf(E element)
long
indexOf(E sample, Equalator<? super E> equalator)
long
indexOf(Predicate<? super E> predicate)
<C extends Consumer<? super E>>
Cintersect(XGettingCollection<? extends E> samples, Equalator<? super E> equalator, C target)
boolean
isSorted(Comparator<? super E> comparator)
void
iterate(Consumer<? super E> procedure)
void
iterate(Predicate<? super E> predicate, Consumer<? super E> procedure)
void
iterateIndexed(IndexedAcceptor<? super E> procedure)
Iterator<E>
iterator()
<A> void
join(BiConsumer<? super E,A> joiner, A aggregate)
E
last()
E
max(Comparator<? super E> comparator)
long
maxIndex(Comparator<? super E> comparator)
E
min(Comparator<? super E> comparator)
long
minIndex(Comparator<? super E> comparator)
long
moveRange(long offset, long length, Consumer<? super E> target)
long
moveSelection(Consumer<? super E> target, long... indices)
long
moveTo(Consumer<? super E> target, Predicate<? super E> predicate)
void
prependEntry(EN entry)
long
process(Consumer<? super E> procedure)
long
reduce(Predicate<? super E> predicate)
E
remove(long index)
long
remove(E element)
long
remove(E sample, Equalator<? super E> equalator)
long
removeAll(E[] elements, int elementsOffset, int elementsLength)
long
removeAll(XGettingCollection<? extends E> elements)
long
removeDuplicates()
long
removeDuplicates(Equalator<? super E> equalator)
long
removeNull()
boolean
removeOne(E element)
boolean
removeOne(E sample, Equalator<? super E> equalator)
void
removeRange(long offset, long length)
long
removeSelection(long... indices)
Removes all entries at the indices (offsets) given in the passedint
array.long
replace(E element, E replacement)
long
replaceAll(E[] elements, int elementsOffset, int elementsLength, E replacement)
long
replaceAll(XGettingCollection<? extends E> elements, E replacement)
long
replaceBy(Predicate<? super E> predicate, E substitute)
long
replaceOne(E element, E replacement)
long
replaceOneBy(Predicate<? super E> predicate, E substitute)
long
retainAll(E[] elements, int elementsOffset, int elementsLength)
int
retainAll(E[] samples, int samplesOffset, int samplesLength, Equalator<? super E> equalator)
long
retainAll(XGettingCollection<? extends E> elements)
long
retainAll(XGettingCollection<? extends E> samples, Equalator<? super E> equalator)
void
retainRange(long offset, long length)
E
retrieve(E element)
E
retrieve(E sample, Equalator<? super E> equalator)
E
retrieve(Predicate<? super E> predicate)
void
reverse()
VarString
rngAppendTo(long offset, long length, VarString vc)
VarString
rngAppendTo(long offset, long length, VarString vc, char separator)
VarString
rngAppendTo(long offset, long length, VarString vc, String separator)
VarString
rngAppendTo(long offset, long length, VarString vc, BiConsumer<VarString,? super E> appender)
VarString
rngAppendTo(long offset, long length, VarString vc, BiConsumer<VarString,? super E> appender, char separator)
VarString
rngAppendTo(long offset, long length, VarString vc, BiConsumer<VarString,? super E> appender, String separator)
boolean
rngAppliesAll(long offset, long length, Predicate<? super E> predicate)
boolean
rngContains(long offset, long length, E element)
boolean
rngContainsAll(long offset, long length, E[] elements, int elementsOffset, int elementsLength)
boolean
rngContainsAll(long offset, long length, XGettingCollection<? extends E> elements)
boolean
rngContainsId(long offset, long length, E element)
boolean
rngContainsNull(long offset, long length)
boolean
rngContainsSearched(long offset, long length, Predicate<? super E> predicate)
<C extends Consumer<? super E>>
CrngCopyTo(long offset, long length, C target)
<C extends Consumer<? super E>>
CrngCopyTo(long offset, long length, C target, Predicate<? super E> predicate)
long
rngCount(long offset, long length, E element)
long
rngCount(long offset, long length, Predicate<? super E> predicate)
<C extends Consumer<? super E>>
CrngDistinct(long offset, long length, C target)
<C extends Consumer<? super E>>
CrngDistinct(long offset, long length, C target, Equalator<? super E> equalator)
<C extends Consumer<? super E>>
CrngExcept(long offset, long length, XGettingCollection<? extends E> samples, Equalator<? super E> equalator, C target)
long
rngIndexOf(long offset, long length, E element)
long
rngIndexOf(long offset, long length, E sample, Equalator<? super E> equalator)
long
rngIndexOf(long offset, long length, Predicate<? super E> predicate)
<C extends Consumer<? super E>>
CrngIntersect(long offset, long length, XGettingCollection<? extends E> samples, Equalator<? super E> equalator, C target)
boolean
rngIsSorted(long offset, long length, Comparator<? super E> comparator)
void
rngIterate(long offset, long length, Consumer<? super E> procedure)
void
rngIterateIndexed(long offset, long length, IndexedAcceptor<? super E> procedure)
E
rngMax(long offset, long length, Comparator<? super E> comparator)
long
rngMaxIndex(long offset, long length, Comparator<? super E> comparator)
E
rngMin(long offset, long length, Comparator<? super E> comparator)
long
rngMinIndex(long offset, long length, Comparator<? super E> comparator)
long
rngMoveTo(long offset, long length, Consumer<? super E> target, Predicate<? super E> predicate)
long
rngProcess(long offset, long length, Consumer<? super E> procedure)
long
rngReduce(long offset, long length, Predicate<? super E> predicate)
long
rngRemove(long offset, long length, E element)
long
rngRemoveAll(long offset, long length, E[] elements, int elementsOffset, int elementsLength)
long
rngRemoveAll(long offset, long length, XGettingCollection<? extends E> elements)
long
rngRemoveDuplicates(long offset, long length)
long
rngRemoveDuplicates(long offset, long length, Equalator<? super E> equalator)
long
rngRemoveNull(long offset, long length)
long
rngReplace(long offset, long length, E element, E replacement)
long
rngReplace(long offset, long length, E sample, Equalator<? super E> equalator, E replacement)
long
rngReplaceAll(long offset, long length, E[] elements, int elementsOffset, int elementsLength, E replacement)
long
rngReplaceAll(long offset, long length, XGettingCollection<? extends E> elements, E replacement)
long
rngReplaceOne(long offset, long length, E element, E replacement)
long
rngReplaceOne(long offset, long length, Predicate<? super E> predicate, E substitute)
long
rngReplaceOneBy(long offset, long length, Predicate<? super E> predicate, E substitute)
long
rngRetainAll(long offset, long length, E[] elements, int elementsOffset, int elementsLength)
long
rngRetainAll(long offset, long length, XGettingCollection<? extends E> elements)
E
rngRetrieve(long offset, long length, E element)
E
rngRetrieve(long offset, long length, E sample, Equalator<? super E> equalator)
void
rngReverse(long offset, long length)
long
rngScan(long offset, long length, Predicate<? super E> predicate)
E
rngSearch(long offset, long length, Predicate<? super E> predicate)
void
rngShuffle(long offset, long length)
void
rngSort(long offset, long length, Comparator<? super E> comparator)
long
rngSubstitute(long offset, long length, Function<E,E> mapper)
long
rngSubstitute(long offset, long length, Predicate<? super E> predicate, Function<E,E> mapper)
Object[]
rngToArray(long offset, int length)
E[]
rngToArray(long offset, int length, Class<E> type)
<C extends Consumer<? super E>>
CrngUnion(long offset, long length, XGettingCollection<? extends E> samples, Equalator<? super E> equalator, C target)
long
scan(Predicate<? super E> predicate)
E
search(Predicate<? super E> predicate)
E
seek(E sample)
E
seek(E sample, Equalator<? super E> equalator)
void
set(long offset, E[] elements)
void
set(long offset, E[] elements, int elementsOffset, int elementsLength)
void
shiftBy(long sourceIndex, long distance)
void
shiftBy(long sourceIndex, long distance, long length)
void
shiftTo(long sourceIndex, long targetIndex)
void
shiftTo(long sourceIndex, long targetIndex, long length)
void
shuffle()
long
size()
void
sort(Comparator<? super E> comparator)
long
substitute(Function<E,E> mapper)
long
substitute(Predicate<? super E> predicate, Function<E,E> mapper)
void
swap(long indexA, long indexB)
void
swap(long indexA, long indexB, long length)
Object[]
toArray()
E[]
toArray(Class<E> type)
String
toString()
<C extends Consumer<? super E>>
Cunion(XGettingCollection<? extends E> samples, Equalator<? super E> equalator, C target)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
appendEntry
public final void appendEntry(EN entry)
-
prependEntry
public final void prependEntry(EN entry)
-
clear
public void clear()
-
shiftBy
public final void shiftBy(long sourceIndex, long distance)
-
shiftBy
public final void shiftBy(long sourceIndex, long distance, long length)
-
shiftTo
public final void shiftTo(long sourceIndex, long targetIndex)
-
shiftTo
public final void shiftTo(long sourceIndex, long targetIndex, long length)
-
removeRange
public final void removeRange(long offset, long length)
-
retainRange
public final void retainRange(long offset, long length)
-
removeSelection
public final long removeSelection(long... indices)
Removes all entries at the indices (offsets) given in the passedint
array.Note that the indices array gets presorted to increase algorithm performance. Pass a clone if the original
int
array shall be unchanged.- Parameters:
indices
- the indices (offsets) of the entries to be removed.- Returns:
- the amount of actually removed entries.
-
equalsContent
public final boolean equalsContent(XGettingCollection<? extends E> other, Equalator<? super E> equalator)
-
getChainEntry
public EN getChainEntry(long index) throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
-
getRangeChainEntry
public EN getRangeChainEntry(long offset, long length) throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
-
getIntervalLowChainEntry
public EN getIntervalLowChainEntry(long lowIndex, long highIndex) throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
-
size
public final long size()
-
consolidate
public final long consolidate()
Description copied from interface:ChainStorage
Removes all empty entries from the passed chain and returns the number of removed entries.- Returns:
- the number of removed entries.
-
hasVolatileElements
public final boolean hasVolatileElements()
-
getReferenceType
public final ReferenceType getReferenceType()
-
containsNull
public final boolean containsNull()
-
rngContainsNull
public final boolean rngContainsNull(long offset, long length)
-
containsId
public final boolean containsId(E element)
-
rngContainsId
public final boolean rngContainsId(long offset, long length, E element)
-
contains
public final boolean contains(E element)
-
rngContains
public final boolean rngContains(long offset, long length, E element)
-
containsAll
public final boolean containsAll(E[] elements, int elementsOffset, int elementsLength)
-
rngContainsAll
public final boolean rngContainsAll(long offset, long length, E[] elements, int elementsOffset, int elementsLength)
-
containsAll
public final boolean containsAll(XGettingCollection<? extends E> elements)
-
rngContainsAll
public final boolean rngContainsAll(long offset, long length, XGettingCollection<? extends E> elements)
-
rngContainsSearched
public final boolean rngContainsSearched(long offset, long length, Predicate<? super E> predicate)
-
rngAppliesAll
public final boolean rngAppliesAll(long offset, long length, Predicate<? super E> predicate)
-
count
public final long count(E element)
-
rngCount
public final long rngCount(long offset, long length, E element)
-
intersect
public final <C extends Consumer<? super E>> C intersect(XGettingCollection<? extends E> samples, Equalator<? super E> equalator, C target)
-
except
public final <C extends Consumer<? super E>> C except(XGettingCollection<? extends E> samples, Equalator<? super E> equalator, C target)
-
union
public final <C extends Consumer<? super E>> C union(XGettingCollection<? extends E> samples, Equalator<? super E> equalator, C target)
-
rngIntersect
public final <C extends Consumer<? super E>> C rngIntersect(long offset, long length, XGettingCollection<? extends E> samples, Equalator<? super E> equalator, C target)
-
rngExcept
public final <C extends Consumer<? super E>> C rngExcept(long offset, long length, XGettingCollection<? extends E> samples, Equalator<? super E> equalator, C target)
-
rngUnion
public final <C extends Consumer<? super E>> C rngUnion(long offset, long length, XGettingCollection<? extends E> samples, Equalator<? super E> equalator, C target)
-
rngCopyTo
public final <C extends Consumer<? super E>> C rngCopyTo(long offset, long length, C target)
-
copySelection
public final <C extends Consumer<? super E>> C copySelection(C target, long[] indices)
-
copyToArray
public final int copyToArray(long offset, int length, Object[] target, int targetOffset)
-
copyTo
public final <C extends Consumer<? super E>> C copyTo(C target, Predicate<? super E> predicate)
-
rngCopyTo
public final <C extends Consumer<? super E>> C rngCopyTo(long offset, long length, C target, Predicate<? super E> predicate)
-
toArray
public final Object[] toArray()
-
rngToArray
public final Object[] rngToArray(long offset, int length)
-
first
public final E first()
-
last
public final E last()
-
get
public final E get(long index)
-
min
public final E min(Comparator<? super E> comparator)
-
max
public final E max(Comparator<? super E> comparator)
-
rngMin
public final E rngMin(long offset, long length, Comparator<? super E> comparator)
-
rngMax
public final E rngMax(long offset, long length, Comparator<? super E> comparator)
-
join
public final <A> void join(BiConsumer<? super E,A> joiner, A aggregate)
-
iterateIndexed
public final void iterateIndexed(IndexedAcceptor<? super E> procedure)
-
rngIterateIndexed
public final void rngIterateIndexed(long offset, long length, IndexedAcceptor<? super E> procedure)
-
indexOf
public final long indexOf(E element)
-
rngIndexOf
public final long rngIndexOf(long offset, long length, E element)
-
rngIndexOf
public final long rngIndexOf(long offset, long length, E sample, Equalator<? super E> equalator)
-
minIndex
public final long minIndex(Comparator<? super E> comparator)
-
maxIndex
public final long maxIndex(Comparator<? super E> comparator)
-
rngMinIndex
public final long rngMinIndex(long offset, long length, Comparator<? super E> comparator)
-
rngMaxIndex
public final long rngMaxIndex(long offset, long length, Comparator<? super E> comparator)
-
hasDistinctValues
public final boolean hasDistinctValues()
-
distinct
public final <C extends Consumer<? super E>> C distinct(C target, Equalator<? super E> equalator)
-
rngDistinct
public final <C extends Consumer<? super E>> C rngDistinct(long offset, long length, C target)
-
rngDistinct
public final <C extends Consumer<? super E>> C rngDistinct(long offset, long length, C target, Equalator<? super E> equalator)
-
appendTo
public final VarString appendTo(VarString vc, BiConsumer<VarString,? super E> appender)
-
appendTo
public final VarString appendTo(VarString vc, BiConsumer<VarString,? super E> appender, char separator)
-
appendTo
public final VarString appendTo(VarString vc, BiConsumer<VarString,? super E> appender, String separator)
-
rngAppendTo
public final VarString rngAppendTo(long offset, long length, VarString vc, char separator)
-
rngAppendTo
public final VarString rngAppendTo(long offset, long length, VarString vc, String separator)
-
rngAppendTo
public final VarString rngAppendTo(long offset, long length, VarString vc, BiConsumer<VarString,? super E> appender)
-
rngAppendTo
public final VarString rngAppendTo(long offset, long length, VarString vc, BiConsumer<VarString,? super E> appender, char separator)
-
rngAppendTo
public final VarString rngAppendTo(long offset, long length, VarString vc, BiConsumer<VarString,? super E> appender, String separator)
-
toString
public final String toString()
-
remove
public final E remove(long index)
-
removeNull
public final long removeNull()
-
rngRemoveNull
public final long rngRemoveNull(long offset, long length)
-
rngRetrieve
public final E rngRetrieve(long offset, long length, E sample, Equalator<? super E> equalator)
-
removeOne
public final boolean removeOne(E element)
-
remove
public final long remove(E element)
-
rngRemove
public final long rngRemove(long offset, long length, E element)
-
removeAll
public final long removeAll(E[] elements, int elementsOffset, int elementsLength)
-
rngRemoveAll
public final long rngRemoveAll(long offset, long length, E[] elements, int elementsOffset, int elementsLength)
-
removeAll
public final long removeAll(XGettingCollection<? extends E> elements)
-
rngRemoveAll
public final long rngRemoveAll(long offset, long length, XGettingCollection<? extends E> elements)
-
removeDuplicates
public final long removeDuplicates()
-
rngRemoveDuplicates
public final long rngRemoveDuplicates(long offset, long length)
-
rngRemoveDuplicates
public final long rngRemoveDuplicates(long offset, long length, Equalator<? super E> equalator)
-
retainAll
public final long retainAll(E[] elements, int elementsOffset, int elementsLength)
-
retainAll
public final int retainAll(E[] samples, int samplesOffset, int samplesLength, Equalator<? super E> equalator)
-
rngRetainAll
public final long rngRetainAll(long offset, long length, E[] elements, int elementsOffset, int elementsLength)
-
retainAll
public final long retainAll(XGettingCollection<? extends E> elements)
-
retainAll
public final long retainAll(XGettingCollection<? extends E> samples, Equalator<? super E> equalator)
-
rngRetainAll
public final long rngRetainAll(long offset, long length, XGettingCollection<? extends E> elements)
-
rngMoveTo
public final long rngMoveTo(long offset, long length, Consumer<? super E> target, Predicate<? super E> predicate)
-
sort
public final void sort(Comparator<? super E> comparator)
-
rngSort
public final void rngSort(long offset, long length, Comparator<? super E> comparator)
-
isSorted
public final boolean isSorted(Comparator<? super E> comparator)
-
rngIsSorted
public final boolean rngIsSorted(long offset, long length, Comparator<? super E> comparator)
-
set
public final void set(long offset, E[] elements)
-
set
public final void set(long offset, E[] elements, int elementsOffset, int elementsLength)
-
fill
public final void fill(long offset, long length, E element)
-
rngReplace
public final long rngReplace(long offset, long length, E sample, Equalator<? super E> equalator, E replacement)
-
replaceAll
public final long replaceAll(E[] elements, int elementsOffset, int elementsLength, E replacement)
-
rngReplaceAll
public final long rngReplaceAll(long offset, long length, E[] elements, int elementsOffset, int elementsLength, E replacement)
-
replaceAll
public final long replaceAll(XGettingCollection<? extends E> elements, E replacement)
-
rngReplaceAll
public final long rngReplaceAll(long offset, long length, XGettingCollection<? extends E> elements, E replacement)
-
rngReplaceOneBy
public final long rngReplaceOneBy(long offset, long length, Predicate<? super E> predicate, E substitute)
-
rngReplaceOne
public final long rngReplaceOne(long offset, long length, Predicate<? super E> predicate, E substitute)
-
rngSubstitute
public final long rngSubstitute(long offset, long length, Predicate<? super E> predicate, Function<E,E> mapper)
-
swap
public final void swap(long indexA, long indexB)
-
swap
public final void swap(long indexA, long indexB, long length)
-
reverse
public final void reverse()
-
rngReverse
public final void rngReverse(long offset, long length)
-
shuffle
public final void shuffle()
-
rngShuffle
public final void rngShuffle(long offset, long length)
-
-