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()
long
lastIndexBy(Predicate<? super E> predicate)
long
lastIndexOf(E element)
long
lastIndexOf(E sample, Equalator<? super E> equalator)
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()
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)
-
Constructor Details
-
Method Details
-
appendEntry
-
prependEntry
-
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.
-
iterator
-
equalsContent
public final boolean equalsContent(XGettingCollection<? extends E> other, Equalator<? super E> equalator) -
getChainEntry
- Throws:
IndexOutOfBoundsException
-
getRangeChainEntry
- Throws:
IndexOutOfBoundsException
-
getIntervalLowChainEntry
- 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
-
containsNull
public final boolean containsNull() -
containsId
-
contains
-
contains
-
containsAll
-
containsAll
-
containsSearched
-
appliesAll
-
count
-
count
-
count
-
intersect
-
except
-
union
-
copyTo
-
copySelection
-
copyToArray
-
copyTo
-
toArray
-
toArray
-
first
-
last
-
get
-
seek
-
seek
-
search
-
min
-
max
-
iterate
-
join
-
iterateIndexed
-
iterate
-
indexOf
-
indexOf
-
lastIndexOf
-
lastIndexOf
-
indexOf
-
lastIndexBy
-
minIndex
-
maxIndex
-
scan
-
hasDistinctValues
public final boolean hasDistinctValues() -
hasDistinctValues
-
distinct
-
distinct
-
appendTo
-
appendTo
-
appendTo
-
appendTo
-
appendTo
public final VarString appendTo(VarString vc, BiConsumer<VarString,? super E> appender, char separator) -
appendTo
-
toString
-
remove
-
removeNull
public final long removeNull() -
retrieve
-
retrieve
-
retrieve
-
removeOne
-
removeOne
-
remove
-
remove
-
removeAll
-
removeAll
-
removeDuplicates
public final long removeDuplicates() -
removeDuplicates
-
reduce
-
retainAll
-
retainAll
-
retainAll
-
retainAll
public final long retainAll(XGettingCollection<? extends E> samples, Equalator<? super E> equalator) -
process
-
moveRange
-
moveSelection
-
moveTo
-
sort
-
isSorted
-
shuffle
public final void shuffle() -
set
-
set
-
fill
-
replaceOne
-
replace
-
replaceAll
-
replaceAll
-
replaceOneBy
-
replaceBy
-
substitute
-
substitute
-
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()
-