Package one.microstream.collections
Class EqConstHashTable.Values
java.lang.Object
one.microstream.collections.EqConstHashTable.Values
- All Implemented Interfaces:
Iterable<V>
,CapacityCarrying
,ExtendedBag<V>
,ExtendedCollection<V>
,ExtendedList<V>
,ExtendedSequence<V>
,Sized
,XGettingBag<V>
,XGettingCollection<V>
,XGettingList<V>
,XGettingMap.Satellite<K,V>
,XGettingMap.Values<K,V>
,XGettingSequence<V>
,XGettingTable.Satellite<K,V>
,XGettingTable.Values<K,V>
,XImmutableBag<V>
,XImmutableCollection<V>
,XImmutableList<V>
,XImmutableMap.Satellite<K,V>
,XImmutableMap.Values<K,V>
,XImmutableSequence<V>
,XImmutableTable.Satellite<K,V>
,XImmutableTable.Values<K,V>
,XIndexIterable<V>
,XIterable<V>
,XJoinable<V>
,ThreadSafe
,HashImmutable
,ComponentType
,Copyable
,Immutable
- Enclosing class:
- EqConstHashTable<K,V>
public final class EqConstHashTable.Values extends Object implements XImmutableTable.Values<K,V>
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.collections.interfaces.ExtendedCollection
ExtendedCollection.Creator<E,C extends ExtendedCollection<E>>
Nested classes/interfaces inherited from interface one.microstream.collections.types.XGettingBag
XGettingBag.Factory<E>
Nested classes/interfaces inherited from interface one.microstream.collections.types.XGettingCollection
XGettingCollection.Creator<E>
Nested classes/interfaces inherited from interface one.microstream.collections.types.XGettingList
XGettingList.Factory<E>
Nested classes/interfaces inherited from interface one.microstream.collections.types.XImmutableBag
XImmutableBag.Factory<E>
Nested classes/interfaces inherited from interface one.microstream.collections.types.XImmutableList
XImmutableList.Factory<E>
Nested classes/interfaces inherited from interface one.microstream.collections.types.XIterable
XIterable.Executor<E>
-
Constructor Summary
Constructors Constructor Description Values()
-
Method Summary
Modifier and Type Method Description boolean
applies(Predicate<? super V> predicate)
V
at(long index)
boolean
contains(V value)
boolean
containsAll(XGettingCollection<? extends V> values)
boolean
containsId(V value)
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 aPredicate
implementation that checks for object identity.boolean
containsSearched(Predicate<? super V> predicate)
XImmutableList<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 V>>
TcopySelection(T target, long... indices)
<T extends Consumer<? super V>>
TcopyTo(T target)
long
count(V value)
long
countBy(Predicate<? super V> predicate)
<T extends Consumer<? super V>>
Tdistinct(T target)
<T extends Consumer<? super V>>
Tdistinct(T target, Equalator<? super V> equalator)
Equalator<? super V>
equality()
boolean
equals(XGettingCollection<? extends V> samples, Equalator<? super V> equalator)
Returnstrue
if the passed collection is of the same type as this collection andthis.equalsContent(list, equalator)
yieldstrue
.boolean
equalsContent(XGettingCollection<? extends V> samples, Equalator<? super V> equalator)
Returnstrue
if all elements of this list and the passed list are sequentially equal as defined by the passed equalator.<T extends Consumer<? super V>>
Texcept(XGettingCollection<? extends V> other, Equalator<? super V> equalator, T target)
<T extends Consumer<? super V>>
TfilterTo(T target, Predicate<? super V> predicate)
V
first()
V
get()
Gets one element from the collection.boolean
hasVolatileElements()
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.XImmutableList<V>
immure()
Provides an instance of an immutable collection type with equal behavior and data as this instance.long
indexBy(Predicate<? super V> predicate)
long
indexOf(V value)
<T extends Consumer<? super V>>
Tintersect(XGettingCollection<? extends V> other, Equalator<? super V> equalator, T target)
boolean
isEmpty()
boolean
isFull()
Returns true if the current capacity cannot be increased any more.boolean
isSorted(Comparator<? super V> comparator)
<P extends Consumer<? super V>>
Piterate(P procedure)
<P extends IndexedAcceptor<? super V>>
PiterateIndexed(P procedure)
Iterator<V>
iterator()
<A> A
join(BiConsumer<? super V,? super A> joiner, A aggregate)
V
last()
long
lastIndexBy(Predicate<? super V> predicate)
long
lastIndexOf(V value)
ListIterator<V>
listIterator()
ListIterator<V>
listIterator(long index)
V
max(Comparator<? super V> comparator)
long
maximumCapacity()
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.long
maxIndex(Comparator<? super V> comparator)
V
min(Comparator<? super V> comparator)
long
minIndex(Comparator<? super V> comparator)
boolean
nullAllowed()
boolean
nullContained()
OldList<V>
old()
EqConstHashTable<K,V>
parent()
V
peek()
V
poll()
XImmutableList<V>
range(long fromIndex, long toIndex)
long
remainingCapacity()
Returns the amount of elements this carrier instance can collect before reaching its maximimum capacity.long
scan(Predicate<? super V> predicate)
Iterates through the collection and returns the index of the last element that the passedPredicate
applied to ("scanning").V
search(Predicate<? super V> predicate)
V
seek(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.long
size()
Object[]
toArray()
V[]
toArray(Class<V> type)
EqConstHashTable.Values
toReversed()
String
toString()
<T extends Consumer<? super V>>
Tunion(XGettingCollection<? extends V> other, Equalator<? super V> equalator, T target)
XImmutableList<V>
view()
XImmutableList<V>
view(long fromIndex, long toIndex)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface one.microstream.collections.types.XGettingCollection
equals, hashCode, intSize
-
Constructor Details
-
Values
public Values()
-
-
Method Details
-
equality
- Specified by:
equality
in interfaceXGettingCollection<V>
-
copy
Description copied from interface:XGettingCollection
Creates 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:
copy
in interfaceCopyable
- Specified by:
copy
in interfaceXGettingBag<V>
- Specified by:
copy
in interfaceXGettingCollection<V>
- Specified by:
copy
in interfaceXGettingList<V>
- Specified by:
copy
in interfaceXGettingSequence<V>
- Specified by:
copy
in interfaceXGettingTable.Values<K,V>
- Specified by:
copy
in interfaceXImmutableBag<V>
- Specified by:
copy
in interfaceXImmutableCollection<V>
- Specified by:
copy
in interfaceXImmutableList<V>
- Specified by:
copy
in interfaceXImmutableSequence<V>
- Specified by:
copy
in interfaceXImmutableTable.Values<K,V>
- Returns:
- a copy of this list
-
iterate
-
join
-
iterateIndexed
- Specified by:
iterateIndexed
in interfaceXIndexIterable<V>
-
toReversed
- Specified by:
toReversed
in interfaceXGettingList<V>
- Specified by:
toReversed
in interfaceXGettingSequence<V>
- Specified by:
toReversed
in interfaceXImmutableList<V>
- Specified by:
toReversed
in interfaceXImmutableSequence<V>
-
containsSearched
- Specified by:
containsSearched
in interfaceXGettingCollection<V>
-
applies
- Specified by:
applies
in interfaceXGettingCollection<V>
-
contains
- Specified by:
contains
in interfaceXGettingCollection<V>
-
containsAll
- Specified by:
containsAll
in interfaceXGettingCollection<V>
-
containsId
Description copied from interface:XGettingCollection
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 aPredicate
implementation that checks for object identity. The only difference is a performance and usability advantage- Specified by:
containsId
in interfaceXGettingCollection<V>
- Parameters:
value
- the element to be searched in the collection by identity.- Returns:
- whether this collection contains exactely the given element.
-
copyTo
- Specified by:
copyTo
in interfaceXGettingCollection<V>
-
filterTo
- Specified by:
filterTo
in interfaceXGettingCollection<V>
-
count
- Specified by:
count
in interfaceXGettingCollection<V>
-
countBy
- Specified by:
countBy
in interfaceXGettingCollection<V>
-
distinct
- Specified by:
distinct
in interfaceXGettingCollection<V>
-
distinct
- Specified by:
distinct
in interfaceXGettingCollection<V>
-
equals
public final boolean equals(XGettingCollection<? extends V> samples, Equalator<? super V> equalator)Description copied from interface:XGettingCollection
Returnstrue
if the passed collection is of the same type as this collection andthis.equalsContent(list, equalator)
yieldstrue
.- Specified by:
equals
in interfaceXGettingCollection<V>
-
equalsContent
public final boolean equalsContent(XGettingCollection<? extends V> samples, Equalator<? super V> equalator)Description copied from interface:XGettingCollection
Returnstrue
if 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:
equalsContent
in interfaceXGettingCollection<V>
equalator
- the equalator to use to determine the equality of each element- Returns:
true
if this list is equal to the passed list, false otherwise
-
except
public final <T extends Consumer<? super V>> T except(XGettingCollection<? extends V> other, Equalator<? super V> equalator, T target)- Specified by:
except
in interfaceXGettingCollection<V>
-
hasVolatileElements
public final boolean hasVolatileElements()Description copied from interface:XGettingCollection
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. Examples areWeakReference
ofSoftReference
or implementations of collection entries that remove the element contained in an entry by some means outside the collection.
Note thatWeakReference
instances 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:
hasVolatileElements
in interfaceExtendedCollection<V>
- Specified by:
hasVolatileElements
in interfaceXGettingCollection<V>
- Returns:
true
if the collection contains volatile elements.
-
intersect
public final <T extends Consumer<? super V>> T intersect(XGettingCollection<? extends V> other, Equalator<? super V> equalator, T target)- Specified by:
intersect
in interfaceXGettingCollection<V>
-
isEmpty
public final boolean isEmpty() -
iterator
-
max
- Specified by:
max
in interfaceXGettingCollection<V>
-
min
- Specified by:
min
in interfaceXGettingCollection<V>
-
nullAllowed
public final boolean nullAllowed()- Specified by:
nullAllowed
in interfaceExtendedCollection<V>
-
nullContained
public final boolean nullContained()- Specified by:
nullContained
in interfaceXGettingCollection<V>
-
old
- Specified by:
old
in interfaceXGettingCollection<V>
- Specified by:
old
in interfaceXGettingList<V>
-
seek
Description copied from interface:XGettingCollection
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. (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:
seek
in interfaceXGettingCollection<V>
-
search
- Specified by:
search
in interfaceXGettingCollection<V>
-
size
public final long size()- Specified by:
size
in interfaceSized
- Specified by:
size
in interfaceXGettingCollection<V>
-
maximumCapacity
public final long maximumCapacity()Description copied from interface:CapacityCarrying
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.Integer.MAX_VALUE
)- Specified by:
maximumCapacity
in interfaceCapacityCarrying
- Returns:
- the maximum amount of elements this carrier instance can contain.
-
isFull
public final boolean isFull()Description copied from interface:CapacityCarrying
Returns true if the current capacity cannot be increased any more.- Specified by:
isFull
in interfaceCapacityCarrying
-
remainingCapacity
public final long remainingCapacity()Description copied from interface:CapacityCarrying
Returns the amount of elements this carrier instance can collect before reaching its maximimum capacity.- Specified by:
remainingCapacity
in interfaceCapacityCarrying
-
toString
-
toArray
- Specified by:
toArray
in interfaceXGettingCollection<V>
-
toArray
- Specified by:
toArray
in interfaceXGettingCollection<V>
-
union
public final <T extends Consumer<? super V>> T union(XGettingCollection<? extends V> other, Equalator<? super V> equalator, T target)- Specified by:
union
in interfaceXGettingCollection<V>
-
parent
- Specified by:
parent
in interfaceXGettingMap.Satellite<K,V>
- Specified by:
parent
in interfaceXGettingTable.Satellite<K,V>
- Specified by:
parent
in interfaceXGettingTable.Values<K,V>
- Specified by:
parent
in interfaceXImmutableMap.Satellite<K,V>
- Specified by:
parent
in interfaceXImmutableTable.Satellite<K,V>
- Specified by:
parent
in interfaceXImmutableTable.Values<K,V>
-
view
- Specified by:
view
in interfaceXGettingList<V>
- Specified by:
view
in interfaceXGettingSequence<V>
- Specified by:
view
in interfaceXImmutableList<V>
-
listIterator
- Specified by:
listIterator
in interfaceXGettingList<V>
-
listIterator
- Specified by:
listIterator
in interfaceXGettingList<V>
-
range
- Specified by:
range
in interfaceXGettingList<V>
- Specified by:
range
in interfaceXGettingSequence<V>
- Specified by:
range
in interfaceXImmutableList<V>
-
immure
Description copied from interface:XGettingCollection
Provides 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:
immure
in interfaceXGettingBag<V>
- Specified by:
immure
in interfaceXGettingCollection<V>
- Specified by:
immure
in interfaceXGettingList<V>
- Specified by:
immure
in interfaceXGettingSequence<V>
- Specified by:
immure
in interfaceXImmutableBag<V>
- Specified by:
immure
in interfaceXImmutableCollection<V>
- Specified by:
immure
in interfaceXImmutableList<V>
- Specified by:
immure
in interfaceXImmutableSequence<V>
- Returns:
- an immutable copy of this collection instance.
- See Also:
XImmutableCollection.copy()
-
view
- Specified by:
view
in interfaceXGettingBag<V>
- Specified by:
view
in interfaceXGettingCollection<V>
- Specified by:
view
in interfaceXGettingList<V>
- Specified by:
view
in interfaceXGettingSequence<V>
- Specified by:
view
in interfaceXImmutableList<V>
-
copySelection
- Specified by:
copySelection
in interfaceXGettingSequence<V>
-
at
- Specified by:
at
in interfaceXGettingSequence<V>
-
get
Description copied from interface:XGettingCollection
Gets 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:
get
in interfaceXGettingCollection<V>
- Specified by:
get
in interfaceXGettingSequence<V>
- Returns:
- the first / any element.
- See Also:
XGettingSequence.at(long)
,XGettingSequence.first()
,XGettingSequence.last()
-
first
- Specified by:
first
in interfaceXGettingSequence<V>
-
last
- Specified by:
last
in interfaceXGettingSequence<V>
-
poll
- Specified by:
poll
in interfaceXGettingSequence<V>
-
peek
- Specified by:
peek
in interfaceXGettingSequence<V>
-
indexOf
- Specified by:
indexOf
in interfaceXGettingSequence<V>
-
indexBy
- Specified by:
indexBy
in interfaceXGettingSequence<V>
-
isSorted
- Specified by:
isSorted
in interfaceXGettingSequence<V>
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceXGettingSequence<V>
-
lastIndexBy
- Specified by:
lastIndexBy
in interfaceXGettingSequence<V>
-
maxIndex
- Specified by:
maxIndex
in interfaceXGettingSequence<V>
-
minIndex
- Specified by:
minIndex
in interfaceXGettingSequence<V>
-
scan
Description copied from interface:XGettingSequence
Iterates through the collection and returns the index of the last element that the passedPredicate
applied to ("scanning").- Specified by:
scan
in interfaceXGettingSequence<V>
- Returns:
- the index of the last positively tested element.
-