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()
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)
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)
-
Method Details
-
appendEntry
-
prependEntry
-
clear
void clear() -
getChainEntry
- Throws:
IndexOutOfBoundsException
-
getRangeChainEntry
- Throws:
IndexOutOfBoundsException
-
getIntervalLowChainEntry
- 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() -
iterator
-
equalsContent
-
containsNull
boolean containsNull() -
containsId
-
contains
-
contains
-
containsAll
-
containsAll
-
containsSearched
-
appliesAll
-
count
-
count
-
count
-
intersect
-
except
-
union
-
copyTo
-
copySelection
-
copyToArray
-
copyTo
-
toArray
Object[] toArray() -
toArray
-
first
E first() -
last
E last() -
get
-
seek
-
seek
-
search
-
min
-
max
-
iterate
-
join
-
iterateIndexed
-
iterate
-
indexOf
-
indexOf
-
indexOf
-
lastIndexOf
-
lastIndexOf
-
lastIndexBy
-
minIndex
-
maxIndex
-
scan
-
hasDistinctValues
boolean hasDistinctValues() -
hasDistinctValues
-
distinct
-
distinct
-
appendTo
-
appendTo
-
appendTo
-
appendTo
-
appendTo
-
appendTo
-
toString
String toString() -
remove
-
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() -
retrieve
-
retrieve
-
retrieve
-
removeOne
-
removeOne
-
remove
-
remove
-
removeAll
-
removeAll
-
removeDuplicates
long removeDuplicates() -
removeDuplicates
-
reduce
-
retainAll
-
retainAll
-
retainAll
-
process
-
moveRange
-
moveSelection
-
moveTo
-
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() -
sort
-
isSorted
-
shuffle
void shuffle() -
set
-
set
-
fill
-
replaceOne
-
replace
-
replaceAll
-
replaceAll
-
replaceOneBy
-
replaceBy
-
substitute
-
substitute
-