Package one.microstream.collections
Class ConstHashTable<K,V>
java.lang.Object
one.microstream.collections.AbstractExtendedCollection<E>
one.microstream.collections.AbstractChainCollection<KeyValue<K,V>,K,V,EN>
one.microstream.collections.AbstractChainKeyValueCollection<K,V,one.microstream.collections.ChainMapEntryLinkedStrongStrong<K,V>>
one.microstream.collections.ConstHashTable<K,V>
- All Implemented Interfaces:
Iterable<KeyValue<K,V>>,CapacityCarrying,ExtendedCollection<KeyValue<K,V>>,ExtendedMap<K,V>,ExtendedSequence<KeyValue<K,V>>,HashCollection<K>,Sized,XGettingCollection<KeyValue<K,V>>,XGettingEnum<KeyValue<K,V>>,XGettingMap<K,V>,XGettingSequence<KeyValue<K,V>>,XGettingSet<KeyValue<K,V>>,XGettingTable<K,V>,XImmutableCollection<KeyValue<K,V>>,XImmutableEnum<KeyValue<K,V>>,XImmutableMap<K,V>,XImmutableSequence<KeyValue<K,V>>,XImmutableSet<KeyValue<K,V>>,XImmutableTable<K,V>,XIndexIterable<KeyValue<K,V>>,XIterable<KeyValue<K,V>>,XJoinable<KeyValue<K,V>>,ThreadSafe,IdentityEqualityLogic,HashImmutable,Composition,Copyable,Immutable
public final class ConstHashTable<K,V> extends AbstractChainKeyValueCollection<K,V,one.microstream.collections.ChainMapEntryLinkedStrongStrong<K,V>> implements XImmutableTable<K,V>, HashCollection<K>, Composition, IdentityEqualityLogic
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceConstHashTable.Creator<K,V>classConstHashTable.KeysclassConstHashTable.OldVarMapclassConstHashTable.ValuesNested classes/interfaces inherited from interface one.microstream.collections.interfaces.HashCollection
HashCollection.Analysis<H>Nested classes/interfaces inherited from interface one.microstream.collections.types.XGettingSequence
XGettingSequence.Factory<E>Nested classes/interfaces inherited from interface one.microstream.collections.types.XImmutableEnum
XImmutableEnum.Factory<E>Nested classes/interfaces inherited from interface one.microstream.collections.types.XImmutableSet
XImmutableSet.Factory<E>Nested classes/interfaces inherited from interface one.microstream.collections.types.XImmutableTable
XImmutableTable.Bridge<K,V>, XImmutableTable.EntriesBridge<K,V>, XImmutableTable.Satellite<K,V>Nested classes/interfaces inherited from interface one.microstream.collections.types.XIterable
XIterable.Executor<E> -
Field Summary
Fields inherited from interface one.microstream.collections.interfaces.HashCollection
DEFAULT_HASH_FACTOR, DEFAULT_HASH_LENGTH -
Constructor Summary
Constructors Constructor Description ConstHashTable() -
Method Summary
Modifier and Type Method Description HashCollection.Analysis<ConstHashTable<K,V>>analyze()booleanapplies(Predicate<? super KeyValue<K,V>> predicate)KeyValue<K,V>at(long index)booleancontains(KeyValue<K,V> entry)booleancontainsAll(XGettingCollection<? extends KeyValue<K,V>> elements)booleancontainsId(KeyValue<K,V> entry)Special version of contains() that guarantees to use identity comparison (" == ") when searching for the given element regardless of the collection's internal logic.
This method has the same behavior asXGettingCollection.containsSearched(Predicate)with aPredicateimplementation that checks for object identity.booleancontainsSearched(Predicate<? super KeyValue<K,V>> predicate)ConstHashTable<K,V>copy()Creates a true copy of this collection which references the same elements as this collection does at the time the method is called.<T extends Consumer<? super KeyValue<K, V>>>
TcopySelection(T target, long... indices)<C extends Consumer<? super KeyValue<K, V>>>
CcopyTo(C target)longcount(KeyValue<K,V> entry)longcountBy(Predicate<? super KeyValue<K,V>> predicate)<C extends Consumer<? super KeyValue<K, V>>>
Cdistinct(C target)<C extends Consumer<? super KeyValue<K, V>>>
Cdistinct(C target, Equalator<? super KeyValue<K,V>> equalator)HashEqualator<KeyValue<K,V>>equality()booleanequals(XGettingCollection<? extends KeyValue<K,V>> samples, Equalator<? super KeyValue<K,V>> equalator)Returnstrueif the passed collection is of the same type as this collection andthis.equalsContent(list, equalator)yieldstrue.booleanequalsContent(XGettingCollection<? extends KeyValue<K,V>> samples, Equalator<? super KeyValue<K,V>> equalator)Returnstrueif all elements of this list and the passed list are sequentially equal as defined by the passed equalator.<C extends Consumer<? super KeyValue<K, V>>>
Cexcept(XGettingCollection<? extends KeyValue<K,V>> other, Equalator<? super KeyValue<K,V>> equalator, C target)<C extends Consumer<? super KeyValue<K, V>>>
CfilterTo(C target, Predicate<? super KeyValue<K,V>> predicate)KeyValue<K,V>first()KeyValue<K,V>get()Gets one element from the collection.Vget(K key)floathashDensity()inthashDistributionRange()HashEqualator<K>hashEquality()booleanhasVolatileElements()Tells if this collection contains volatile elements.
An element is volatile, if it can become no longer reachable by the collection without being removed from the collection.booleanhasVolatileHashElements()ConstHashTable<K,V>immure()Provides an instance of an immutable collection type with equal behavior and data as this instance.longindexBy(Predicate<? super KeyValue<K,V>> predicate)longindexOf(KeyValue<K,V> entry)<C extends Consumer<? super KeyValue<K, V>>>
Cintersect(XGettingCollection<? extends KeyValue<K,V>> other, Equalator<? super KeyValue<K,V>> equalator, C target)booleanisEmpty()booleanisFull()Returns true if the current capacity cannot be increased any more.booleanisSorted(Comparator<? super KeyValue<K,V>> comparator)<P extends Consumer<? super KeyValue<K, V>>>
Piterate(P procedure)<P extends IndexedAcceptor<? super KeyValue<K, V>>>
PiterateIndexed(P procedure)Iterator<KeyValue<K,V>>iterator()<A> Ajoin(BiConsumer<? super KeyValue<K,V>,? super A> joiner, A aggregate)ConstHashTable.Keyskeys()KeyValue<K,V>last()longlastIndexBy(Predicate<? super KeyValue<K,V>> predicate)longlastIndexOf(KeyValue<K,V> entry)KeyValue<K,V>lookup(K key)KeyValue<K,V>max(Comparator<? super KeyValue<K,V>> comparator)longmaximumCapacity()Returns the maximum amount of elements this carrier instance can contain.
The actual value may be depend on the configuration of the concrete instance or may depend only on the implementation of the carrier (meaning it is constant for all instances of the implementation, e.g.longmaxIndex(Comparator<? super KeyValue<K,V>> comparator)KeyValue<K,V>min(Comparator<? super KeyValue<K,V>> comparator)longminIndex(Comparator<? super KeyValue<K,V>> comparator)static <K, V> ConstHashTable<K,V>New()static <K, V> ConstHashTable<K,V>New(XGettingCollection<? extends KeyValue<? extends K,? extends V>> entries)static <K, V> ConstHashTable<K,V>New(KeyValue<? extends K,? extends V>... entries)static <K, V> ConstHashTable<K,V>NewCustom(float hashDensity)static <K, V> ConstHashTable<K,V>NewCustom(int initialHashLength)static <K, V> ConstHashTable<K,V>NewCustom(int initialHashLength, float hashDensity)static <K, V> ConstHashTable<K,V>NewCustom(int initialHashLength, float hashDensity, XGettingCollection<? extends KeyValue<? extends K,? extends V>> entries)static <K, V> ConstHashTable<K,V>NewCustom(int initialHashLength, float hashDensity, KeyValue<? extends K,? extends V>... entries)static <KI, VI, KO, VO>
ConstHashTable<KO,VO>NewProjected(float hashDensity, XGettingCollection<? extends KeyValue<KI,VI>> entries, Function<? super KI,KO> keyProjector, Function<? super VI,VO> valueProjector)static <KO, VO, KI extends KO, VI extends VO>
ConstHashTable<KO,VO>NewProjected(XGettingCollection<? extends KeyValue<KI,VI>> entries)static <KI, VI, KO, VO>
ConstHashTable<KO,VO>NewProjected(XGettingCollection<? extends KeyValue<KI,VI>> entries, Function<? super KI,KO> keyProjector, Function<? super VI,VO> valueProjector)static <K, V> ConstHashTable<K,V>NewSingle(K key, V value)booleannullAllowed()booleannullContained()booleannullKeyAllowed()booleannullValuesAllowed()XImmutableTable.EntriesBridge<K,V>old()XImmutableTable.Bridge<K,V>oldMap()KeyValue<K,V>peek()KeyValue<K,V>poll()Predicate<KeyValue<K,V>>predicateContainsEntry()static <KI, VI, KO, VO>
Aggregator<KeyValue<KI,VI>,ConstHashTable<KO,VO>>projector(ConstHashTable<KO,VO> target, Function<KI,KO> keyProjector, Function<VI,VO> valueProjector)<C extends Consumer<? super V>>
Cquery(XIterable<? extends K> keys, C collector)XEnum<KeyValue<K,V>>range(long lowIndex, long highIndex)intrehash()Recalculates the hash value of all entries and reorginazes and optimizes the hash storage accordingly.longremainingCapacity()Returns the amount of elements this carrier instance can collect before reaching its maximimum capacity.longscan(Predicate<? super KeyValue<K,V>> predicate)Iterates through the collection and returns the index of the last element that the passedPredicateapplied to ("scanning").KeyValue<K,V>search(Predicate<? super KeyValue<K,V>> predicate)VsearchValue(Predicate<? super K> keyPredicate)KeyValue<K,V>seek(KeyValue<K,V> sample)Returns the first contained element matching the passed sample as defined by the collection's equality logic or null, if no fitting element is contained.voidsetHashDensity(float hashDensity)Sets the hash density (1/density) of this hashing collection if applicable.longsize()Object[]toArray()KeyValue<K,V>[]toArray(Class<KeyValue<K,V>> type)ConstHashTable<K,V>toReversed()StringtoString()<C extends Consumer<? super KeyValue<K, V>>>
Cunion(XGettingCollection<? extends KeyValue<K,V>> other, Equalator<? super KeyValue<K,V>> equalator, C target)ConstHashTable.Valuesvalues()XGettingTable<K,V>view()XGettingEnum<KeyValue<K,V>>view(long lowIndex, long highIndex)Methods inherited from class one.microstream.collections.AbstractExtendedCollection
ensureFreeArrayCapacity, validateIndexMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface one.microstream.collections.types.XGettingCollection
equals, hashCode, intSize
-
Constructor Details
-
ConstHashTable
public ConstHashTable()
-
-
Method Details
-
projector
public static final <KI, VI, KO, VO> Aggregator<KeyValue<KI,VI>,ConstHashTable<KO,VO>> projector(ConstHashTable<KO,VO> target, Function<KI,KO> keyProjector, Function<VI,VO> valueProjector) -
New
-
NewCustom
-
NewCustom
-
NewCustom
public static final <K, V> ConstHashTable<K,V> NewCustom(int initialHashLength, float hashDensity) -
New
public static final <K, V> ConstHashTable<K,V> New(XGettingCollection<? extends KeyValue<? extends K,? extends V>> entries) -
NewCustom
public static final <K, V> ConstHashTable<K,V> NewCustom(int initialHashLength, float hashDensity, XGettingCollection<? extends KeyValue<? extends K,? extends V>> entries) -
NewSingle
-
New
@SafeVarargs public static final <K, V> ConstHashTable<K,V> New(KeyValue<? extends K,? extends V>... entries) -
NewCustom
@SafeVarargs public static final <K, V> ConstHashTable<K,V> NewCustom(int initialHashLength, float hashDensity, KeyValue<? extends K,? extends V>... entries) -
NewProjected
public static final <KI, VI, KO, VO> ConstHashTable<KO,VO> NewProjected(float hashDensity, XGettingCollection<? extends KeyValue<KI,VI>> entries, Function<? super KI,KO> keyProjector, Function<? super VI,VO> valueProjector) -
NewProjected
public static final <KO, VO, KI extends KO, VI extends VO> ConstHashTable<KO,VO> NewProjected(XGettingCollection<? extends KeyValue<KI,VI>> entries) -
NewProjected
public static final <KI, VI, KO, VO> ConstHashTable<KO,VO> NewProjected(XGettingCollection<? extends KeyValue<KI,VI>> entries, Function<? super KI,KO> keyProjector, Function<? super VI,VO> valueProjector) -
lookup
- Specified by:
lookupin interfaceXGettingMap<K,V>
-
size
public final long size()- Specified by:
sizein interfaceHashCollection<K>- Specified by:
sizein interfaceSized- Specified by:
sizein interfaceXGettingCollection<K>
-
rehash
public final int rehash()Description copied from interface:HashCollectionRecalculates the hash value of all entries and reorginazes and optimizes the hash storage accordingly. This method is meant for cases where a hash collection has to collect its elements before proper hash values can be derived for them or where hash mutable elements can change their hash-relevant state after having been added (and hashed) in a hash collection. Note that depending on the hash-relevant state of elements and their changing of it, it can be possible that some elements oust others, thus decreasing the collection's size. This behavior depends on the type of the elements and the used hash logic and cannot be compensated by a general purpose collection implementation.- Specified by:
rehashin interfaceHashCollection<K>- Returns:
- the new size of the collection which might be lower than before the call.
-
isEmpty
public final boolean isEmpty() -
copy
Description copied from interface:XGettingCollectionCreates a true copy of this collection which references the same elements as this collection does at the time the method is called. The elements themselves are NOT copied (no deep copying).
The type of the returned set is the same as of this list if possible.- Specified by:
copyin interfaceCopyable- Specified by:
copyin interfaceXGettingCollection<K>- Specified by:
copyin interfaceXGettingEnum<K>- Specified by:
copyin interfaceXGettingMap<K,V>- Specified by:
copyin interfaceXGettingSequence<K>- Specified by:
copyin interfaceXGettingSet<K>- Specified by:
copyin interfaceXGettingTable<K,V>- Specified by:
copyin interfaceXImmutableCollection<K>- Specified by:
copyin interfaceXImmutableEnum<K>- Specified by:
copyin interfaceXImmutableMap<K,V>- Specified by:
copyin interfaceXImmutableSequence<K>- Specified by:
copyin interfaceXImmutableSet<K>- Specified by:
copyin interfaceXImmutableTable<K,V>- Returns:
- a copy of this list
-
immure
Description copied from interface:XImmutableTableProvides an instance of an immutable collection type with equal behavior and data as this instance.If this instance already is of an immutable collection type, it returns itself.
- Specified by:
immurein interfaceXGettingCollection<K>- Specified by:
immurein interfaceXGettingEnum<K>- Specified by:
immurein interfaceXGettingMap<K,V>- Specified by:
immurein interfaceXGettingSequence<K>- Specified by:
immurein interfaceXGettingSet<K>- Specified by:
immurein interfaceXGettingTable<K,V>- Specified by:
immurein interfaceXImmutableCollection<K>- Specified by:
immurein interfaceXImmutableEnum<K>- Specified by:
immurein interfaceXImmutableMap<K,V>- Specified by:
immurein interfaceXImmutableSequence<K>- Specified by:
immurein interfaceXImmutableSet<K>- Specified by:
immurein interfaceXImmutableTable<K,V>- Returns:
- an immutable copy of this collection instance.
- See Also:
XImmutableCollection.copy()
-
view
- Specified by:
viewin interfaceXGettingCollection<K>- Specified by:
viewin interfaceXGettingEnum<K>- Specified by:
viewin interfaceXGettingMap<K,V>- Specified by:
viewin interfaceXGettingSequence<K>- Specified by:
viewin interfaceXGettingTable<K,V>
-
setHashDensity
public final void setHashDensity(float hashDensity)Description copied from interface:HashCollectionSets the hash density (1/density) of this hashing collection if applicable.If this procedure is not applicable for the hash collection (e.g. an immutable hash collection), calling this method has no effect.
- Specified by:
setHashDensityin interfaceHashCollection<K>- Parameters:
hashDensity- the new hash density to be set.
-
hasVolatileElements
public final boolean hasVolatileElements()Description copied from interface:XGettingCollectionTells if this collection contains volatile elements.
An element is volatile, if it can become no longer reachable by the collection without being removed from the collection. Examples areWeakReferenceofSoftReferenceor implementations of collection entries that remove the element contained in an entry by some means outside the collection.
Note thatWeakReferenceinstances that are added to a a simple (non-volatile) implementation of a collection do NOT make the collection volatile, as the elements themselves (the reference instances) are still strongly referenced.- Specified by:
hasVolatileElementsin interfaceExtendedCollection<K>- Specified by:
hasVolatileElementsin interfaceXGettingCollection<K>- Returns:
trueif the collection contains volatile elements.
-
nullAllowed
public final boolean nullAllowed()- Specified by:
nullAllowedin interfaceExtendedCollection<K>
-
nullKeyAllowed
public final boolean nullKeyAllowed()- Specified by:
nullKeyAllowedin interfaceXGettingMap<K,V>- Specified by:
nullKeyAllowedin interfaceXImmutableMap<K,V>- Specified by:
nullKeyAllowedin interfaceXImmutableTable<K,V>
-
nullValuesAllowed
public final boolean nullValuesAllowed()- Specified by:
nullValuesAllowedin interfaceXGettingMap<K,V>- Specified by:
nullValuesAllowedin interfaceXImmutableMap<K,V>- Specified by:
nullValuesAllowedin interfaceXImmutableTable<K,V>
-
get
- Specified by:
getin interfaceXGettingMap<K,V>- Specified by:
getin interfaceXImmutableMap<K,V>- Specified by:
getin interfaceXImmutableTable<K,V>
-
keys
- Specified by:
keysin interfaceXGettingMap<K,V>- Specified by:
keysin interfaceXGettingTable<K,V>- Specified by:
keysin interfaceXImmutableMap<K,V>- Specified by:
keysin interfaceXImmutableTable<K,V>
-
old
- Specified by:
oldin interfaceXGettingCollection<K>- Specified by:
oldin interfaceXGettingMap<K,V>- Specified by:
oldin interfaceXGettingTable<K,V>- Specified by:
oldin interfaceXImmutableMap<K,V>- Specified by:
oldin interfaceXImmutableTable<K,V>
-
oldMap
- Specified by:
oldMapin interfaceXGettingMap<K,V>- Specified by:
oldMapin interfaceXGettingTable<K,V>- Specified by:
oldMapin interfaceXImmutableMap<K,V>- Specified by:
oldMapin interfaceXImmutableTable<K,V>
-
searchValue
- Specified by:
searchValuein interfaceXGettingMap<K,V>- Specified by:
searchValuein interfaceXImmutableMap<K,V>- Specified by:
searchValuein interfaceXImmutableTable<K,V>
-
query
- Specified by:
queryin interfaceXGettingMap<K,V>
-
values
- Specified by:
valuesin interfaceXGettingMap<K,V>- Specified by:
valuesin interfaceXGettingTable<K,V>- Specified by:
valuesin interfaceXImmutableMap<K,V>- Specified by:
valuesin interfaceXImmutableTable<K,V>
-
maximumCapacity
public final long maximumCapacity()Description copied from interface:CapacityCarryingReturns the maximum amount of elements this carrier instance can contain.
The actual value may be depend on the configuration of the concrete instance or may depend only on the implementation of the carrier (meaning it is constant for all instances of the implementation, e.g.Integer.MAX_VALUE)- Specified by:
maximumCapacityin interfaceCapacityCarrying- Returns:
- the maximum amount of elements this carrier instance can contain.
-
isFull
public final boolean isFull()Description copied from interface:CapacityCarryingReturns true if the current capacity cannot be increased any more.- Specified by:
isFullin interfaceCapacityCarrying
-
remainingCapacity
public final long remainingCapacity()Description copied from interface:CapacityCarryingReturns the amount of elements this carrier instance can collect before reaching its maximimum capacity.- Specified by:
remainingCapacityin interfaceCapacityCarrying
-
analyze
- Specified by:
analyzein interfaceHashCollection<K>
-
hashDistributionRange
public final int hashDistributionRange()- Specified by:
hashDistributionRangein interfaceHashCollection<K>
-
hashEquality
- Specified by:
hashEqualityin interfaceHashCollection<K>
-
hashDensity
public final float hashDensity()- Specified by:
hashDensityin interfaceHashCollection<K>
-
hasVolatileHashElements
public final boolean hasVolatileHashElements()- Specified by:
hasVolatileHashElementsin interfaceHashCollection<K>
-
toString
-
predicateContainsEntry
-
range
- Specified by:
rangein interfaceXGettingEnum<K>- Specified by:
rangein interfaceXGettingSequence<K>
-
view
- Specified by:
viewin interfaceXGettingEnum<K>- Specified by:
viewin interfaceXGettingSequence<K>
-
toArray
- Specified by:
toArrayin interfaceXGettingCollection<K>
-
iterate
- Specified by:
iteratein interfaceXGettingEnum<K>- Specified by:
iteratein interfaceXGettingSet<K>- Specified by:
iteratein interfaceXIterable<K>
-
join
-
count
- Specified by:
countin interfaceXGettingCollection<K>
-
countBy
- Specified by:
countByin interfaceXGettingCollection<K>
-
search
- Specified by:
searchin interfaceXGettingCollection<K>
-
max
- Specified by:
maxin interfaceXGettingCollection<K>
-
min
- Specified by:
minin interfaceXGettingCollection<K>
-
containsSearched
- Specified by:
containsSearchedin interfaceXGettingCollection<K>
-
applies
- Specified by:
appliesin interfaceXGettingCollection<K>
-
nullContained
public final boolean nullContained()- Specified by:
nullContainedin interfaceXGettingCollection<K>
-
containsId
Description copied from interface:XGettingCollectionSpecial version of contains() that guarantees to use identity comparison (" == ") when searching for the given element regardless of the collection's internal logic.
This method has the same behavior asXGettingCollection.containsSearched(Predicate)with aPredicateimplementation that checks for object identity. The only difference is a performance and usability advantage- Specified by:
containsIdin interfaceXGettingCollection<K>- Parameters:
entry- the element to be searched in the collection by identity.- Returns:
- whether this collection contains exactely the given element.
-
contains
- Specified by:
containsin interfaceXGettingCollection<K>
-
seek
Description copied from interface:XGettingCollectionReturns the first contained element matching the passed sample as defined by the collection's equality logic or null, if no fitting element is contained. (For collections using referential equality, this method is basically just a variation ofXGettingCollection.contains(Object)with a different return type. For collections with data-dependant equality, the returned element might be the same as the passed one or a data-wise equal one, depending on the content of the collection)- Specified by:
seekin interfaceXGettingCollection<K>
-
containsAll
- Specified by:
containsAllin interfaceXGettingCollection<K>
-
equals
public final boolean equals(XGettingCollection<? extends KeyValue<K,V>> samples, Equalator<? super KeyValue<K,V>> equalator)Description copied from interface:XGettingCollectionReturnstrueif the passed collection is of the same type as this collection andthis.equalsContent(list, equalator)yieldstrue.- Specified by:
equalsin interfaceXGettingCollection<K>
-
equalsContent
public final boolean equalsContent(XGettingCollection<? extends KeyValue<K,V>> samples, Equalator<? super KeyValue<K,V>> equalator)Description copied from interface:XGettingCollectionReturnstrueif all elements of this list and the passed list are sequentially equal as defined by the passed equalator.Note that for colletion types that don't have a defined order of elements, this method is hardly usable (as is
XGettingCollection.equals(Object)for them as defined inCollection). The core problem of comparing collections that have no defined order is that they aren't really reliably comparable to any other collection.- Specified by:
equalsContentin interfaceXGettingCollection<K>equalator- the equalator to use to determine the equality of each element- Returns:
trueif this list is equal to the passed list, false otherwise
-
intersect
public final <C extends Consumer<? super KeyValue<K, V>>> C intersect(XGettingCollection<? extends KeyValue<K,V>> other, Equalator<? super KeyValue<K,V>> equalator, C target)- Specified by:
intersectin interfaceXGettingCollection<K>
-
except
public final <C extends Consumer<? super KeyValue<K, V>>> C except(XGettingCollection<? extends KeyValue<K,V>> other, Equalator<? super KeyValue<K,V>> equalator, C target)- Specified by:
exceptin interfaceXGettingCollection<K>
-
union
public final <C extends Consumer<? super KeyValue<K, V>>> C union(XGettingCollection<? extends KeyValue<K,V>> other, Equalator<? super KeyValue<K,V>> equalator, C target)- Specified by:
unionin interfaceXGettingCollection<K>
-
copyTo
- Specified by:
copyToin interfaceXGettingCollection<K>
-
filterTo
public final <C extends Consumer<? super KeyValue<K, V>>> C filterTo(C target, Predicate<? super KeyValue<K,V>> predicate)- Specified by:
filterToin interfaceXGettingCollection<K>
-
distinct
- Specified by:
distinctin interfaceXGettingCollection<K>
-
distinct
public final <C extends Consumer<? super KeyValue<K, V>>> C distinct(C target, Equalator<? super KeyValue<K,V>> equalator)- Specified by:
distinctin interfaceXGettingCollection<K>
-
toReversed
- Specified by:
toReversedin interfaceXGettingEnum<K>- Specified by:
toReversedin interfaceXGettingSequence<K>- Specified by:
toReversedin interfaceXImmutableEnum<K>- Specified by:
toReversedin interfaceXImmutableSequence<K>
-
copySelection
public final <T extends Consumer<? super KeyValue<K, V>>> T copySelection(T target, long... indices)- Specified by:
copySelectionin interfaceXGettingSequence<K>
-
iterateIndexed
- Specified by:
iterateIndexedin interfaceXIndexIterable<K>
-
at
- Specified by:
atin interfaceXGettingSequence<K>
-
get
Description copied from interface:XGettingCollectionGets one element from the collection. If the collection is not orderedXGettingSequence, then it is undefined which element is returned. If the collection is ordered, the element at index 0 is returned.- Specified by:
getin interfaceXGettingCollection<K>- Specified by:
getin interfaceXGettingSequence<K>- Returns:
- the first / any element.
- See Also:
XGettingSequence.at(long),XGettingSequence.first(),XGettingSequence.last()
-
first
- Specified by:
firstin interfaceXGettingSequence<K>
-
last
- Specified by:
lastin interfaceXGettingSequence<K>
-
poll
- Specified by:
pollin interfaceXGettingSequence<K>
-
peek
- Specified by:
peekin interfaceXGettingSequence<K>
-
indexOf
- Specified by:
indexOfin interfaceXGettingSequence<K>
-
indexBy
- Specified by:
indexByin interfaceXGettingSequence<K>
-
isSorted
- Specified by:
isSortedin interfaceXGettingSequence<K>
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceXGettingSequence<K>
-
lastIndexBy
- Specified by:
lastIndexByin interfaceXGettingSequence<K>
-
maxIndex
- Specified by:
maxIndexin interfaceXGettingSequence<K>
-
minIndex
- Specified by:
minIndexin interfaceXGettingSequence<K>
-
scan
Description copied from interface:XGettingSequenceIterates through the collection and returns the index of the last element that the passedPredicateapplied to ("scanning").- Specified by:
scanin interfaceXGettingSequence<K>- Returns:
- the index of the last positively tested element.
-
iterator
-
toArray
- Specified by:
toArrayin interfaceXGettingCollection<K>
-
equality
- Specified by:
equalityin interfaceXGettingCollection<K>
-