Interface ChainStorage<E,K,V,EN extends ChainStorage.Entry<E,K,V,EN>>
-
- All Superinterfaces:
Composition
,Iterable<E>
- All Known Subinterfaces:
ChainKeyValueStorage<K,V,EN>
- All Known Implementing Classes:
AbstractChainKeyValueStorage
,AbstractChainStorage
,ChainStorageStrong
,ChainStrongStrongStorage
public interface ChainStorage<E,K,V,EN extends ChainStorage.Entry<E,K,V,EN>> extends Iterable<E>, Composition
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ChainStorage.Entry<E,K,V,EN extends ChainStorage.Entry<E,K,V,EN>>
-
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)
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 interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
appendEntry
void appendEntry(EN entry)
-
prependEntry
void prependEntry(EN entry)
-
clear
void clear()
-
getChainEntry
EN getChainEntry(long index) throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
-
getRangeChainEntry
EN getRangeChainEntry(long offset, long length) throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
-
getIntervalLowChainEntry
EN getIntervalLowChainEntry(long lowIndex, long highIndex) throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
-
size
long size()
-
consolidate
long consolidate()
Removes all empty entries from the passed chain and returns the number of removed entries.- Returns:
- the number of removed entries.
-
hasVolatileElements
boolean hasVolatileElements()
-
getReferenceType
ReferenceType getReferenceType()
-
equalsContent
boolean equalsContent(XGettingCollection<? extends E> other, Equalator<? super E> equalator)
-
containsNull
boolean containsNull()
-
rngContainsNull
boolean rngContainsNull(long offset, long length)
-
containsId
boolean containsId(E element)
-
rngContainsId
boolean rngContainsId(long offset, long length, E element)
-
contains
boolean contains(E element)
-
rngContains
boolean rngContains(long offset, long length, E element)
-
containsAll
boolean containsAll(E[] elements, int elementsOffset, int elementsLength)
-
rngContainsAll
boolean rngContainsAll(long offset, long length, E[] elements, int elementsOffset, int elementsLength)
-
containsAll
boolean containsAll(XGettingCollection<? extends E> elements)
-
rngContainsAll
boolean rngContainsAll(long offset, long length, XGettingCollection<? extends E> elements)
-
rngContainsSearched
boolean rngContainsSearched(long offset, long length, Predicate<? super E> predicate)
-
count
long count(E element)
-
rngCount
long rngCount(long offset, long length, E element)
-
intersect
<C extends Consumer<? super E>> C intersect(XGettingCollection<? extends E> samples, Equalator<? super E> equalator, C target)
-
except
<C extends Consumer<? super E>> C except(XGettingCollection<? extends E> samples, Equalator<? super E> equalator, C target)
-
union
<C extends Consumer<? super E>> C union(XGettingCollection<? extends E> samples, Equalator<? super E> equalator, C target)
-
rngIntersect
<C extends Consumer<? super E>> C rngIntersect(long offset, long length, XGettingCollection<? extends E> samples, Equalator<? super E> equalator, C target)
-
rngExcept
<C extends Consumer<? super E>> C rngExcept(long offset, long length, XGettingCollection<? extends E> samples, Equalator<? super E> equalator, C target)
-
rngUnion
<C extends Consumer<? super E>> C rngUnion(long offset, long length, XGettingCollection<? extends E> samples, Equalator<? super E> equalator, C target)
-
copyToArray
int copyToArray(long offset, int length, Object[] target, int targetOffset)
-
rngCopyTo
<C extends Consumer<? super E>> C rngCopyTo(long offset, long length, C target, Predicate<? super E> predicate)
-
toArray
Object[] toArray()
-
rngToArray
Object[] rngToArray(long offset, int length)
-
first
E first()
-
last
E last()
-
get
E get(long index)
-
min
E min(Comparator<? super E> comparator)
-
max
E max(Comparator<? super E> comparator)
-
rngMin
E rngMin(long offset, long length, Comparator<? super E> comparator)
-
rngMax
E rngMax(long offset, long length, Comparator<? super E> comparator)
-
join
<A> void join(BiConsumer<? super E,A> joiner, A aggregate)
-
iterateIndexed
void iterateIndexed(IndexedAcceptor<? super E> procedure)
-
rngIterateIndexed
void rngIterateIndexed(long offset, long length, IndexedAcceptor<? super E> procedure)
-
indexOf
long indexOf(E element)
-
rngIndexOf
long rngIndexOf(long offset, long length, E element)
-
minIndex
long minIndex(Comparator<? super E> comparator)
-
maxIndex
long maxIndex(Comparator<? super E> comparator)
-
rngMinIndex
long rngMinIndex(long offset, long length, Comparator<? super E> comparator)
-
rngMaxIndex
long rngMaxIndex(long offset, long length, Comparator<? super E> comparator)
-
hasDistinctValues
boolean hasDistinctValues()
-
rngDistinct
<C extends Consumer<? super E>> C rngDistinct(long offset, long length, C target, Equalator<? super E> equalator)
-
appendTo
VarString appendTo(VarString vc, BiConsumer<VarString,? super E> appender)
-
appendTo
VarString appendTo(VarString vc, BiConsumer<VarString,? super E> appender, char separator)
-
appendTo
VarString appendTo(VarString vc, BiConsumer<VarString,? super E> appender, String separator)
-
rngAppendTo
VarString rngAppendTo(long offset, long length, VarString vc, BiConsumer<VarString,? super E> appender)
-
rngAppendTo
VarString rngAppendTo(long offset, long length, VarString vc, BiConsumer<VarString,? super E> appender, char separator)
-
rngAppendTo
VarString rngAppendTo(long offset, long length, VarString vc, BiConsumer<VarString,? super E> appender, String separator)
-
remove
E remove(long index)
-
removeRange
void removeRange(long offset, long length)
-
retainRange
void retainRange(long offset, long length)
-
removeSelection
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. If the original
int
array shall be unchanged, a clone must be passed.- Parameters:
indices
- the indices (offsets) of the entries to be removed.- Returns:
- the amount of actually removed entries.
-
removeNull
long removeNull()
-
rngRemoveNull
long rngRemoveNull(long offset, long length)
-
removeOne
boolean removeOne(E element)
-
remove
long remove(E element)
-
rngRemove
long rngRemove(long offset, long length, E element)
-
removeAll
long removeAll(E[] elements, int elementsOffset, int elementsLength)
-
rngRemoveAll
long rngRemoveAll(long offset, long length, E[] elements, int elementsOffset, int elementsLength)
-
removeAll
long removeAll(XGettingCollection<? extends E> elements)
-
rngRemoveAll
long rngRemoveAll(long offset, long length, XGettingCollection<? extends E> elements)
-
removeDuplicates
long removeDuplicates()
-
rngRemoveDuplicates
long rngRemoveDuplicates(long offset, long length)
-
rngRemoveDuplicates
long rngRemoveDuplicates(long offset, long length, Equalator<? super E> equalator)
-
retainAll
long retainAll(E[] elements, int elementsOffset, int elementsLength)
-
rngRetainAll
long rngRetainAll(long offset, long length, E[] elements, int elementsOffset, int elementsLength)
-
retainAll
long retainAll(XGettingCollection<? extends E> elements)
-
retainAll
long retainAll(XGettingCollection<? extends E> samples, Equalator<? super E> equalator)
-
rngRetainAll
long rngRetainAll(long offset, long length, XGettingCollection<? extends E> elements)
-
rngMoveTo
long rngMoveTo(long offset, long length, Consumer<? super E> target, Predicate<? super E> predicate)
-
shiftTo
void shiftTo(long sourceIndex, long targetIndex)
-
shiftTo
void shiftTo(long sourceIndex, long targetIndex, long length)
-
shiftBy
void shiftBy(long sourceIndex, long distance)
-
shiftBy
void shiftBy(long sourceIndex, long distance, long length)
-
swap
void swap(long indexA, long indexB)
-
swap
void swap(long indexA, long indexB, long length)
-
reverse
void reverse()
-
rngReverse
void rngReverse(long offset, long length)
-
sort
void sort(Comparator<? super E> comparator)
-
rngSort
void rngSort(long offset, long length, Comparator<? super E> comparator)
-
isSorted
boolean isSorted(Comparator<? super E> comparator)
-
rngIsSorted
boolean rngIsSorted(long offset, long length, Comparator<? super E> comparator)
-
shuffle
void shuffle()
-
rngShuffle
void rngShuffle(long offset, long length)
-
set
void set(long offset, E[] elements)
-
set
void set(long offset, E[] elements, int elementsOffset, int elementsLength)
-
fill
void fill(long offset, long length, E element)
-
rngReplace
long rngReplace(long offset, long length, E sample, Equalator<? super E> equalator, E replacement)
-
rngReplaceAll
long rngReplaceAll(long offset, long length, E[] elements, int elementsOffset, int elementsLength, E replacement)
-
replaceAll
long replaceAll(XGettingCollection<? extends E> elements, E replacement)
-
rngReplaceAll
long rngReplaceAll(long offset, long length, XGettingCollection<? extends E> elements, E replacement)
-
rngSubstitute
long rngSubstitute(long offset, long length, Predicate<? super E> predicate, Function<E,E> mapper)
-
rngReplaceOneBy
long rngReplaceOneBy(long offset, long length, Predicate<? super E> predicate, E substitute)
-
-