Interface XMap<K,V>
- Type Parameters:
K- type of contained keysV- type of contained values
- All Superinterfaces:
CapacityCarrying,CapacityExtendable,Clearable,ConsolidatableCollection,Consumer<KeyValue<K,V>>,Copyable,ExtendedCollection<KeyValue<K,V>>,ExtendedMap<K,V>,Iterable<KeyValue<K,V>>,OptimizableCollection,Processable<KeyValue<K,V>>,ReleasingCollection<KeyValue<K,V>>,Sized,Truncateable,XAddGetCollection<KeyValue<K,V>>,XAddGetMap<K,V>,XAddGetSet<KeyValue<K,V>>,XAddingCollection<KeyValue<K,V>>,XAddingMap<K,V>,XAddingSet<KeyValue<K,V>>,XCollection<KeyValue<K,V>>,XGettingCollection<KeyValue<K,V>>,XGettingMap<K,V>,XGettingSet<KeyValue<K,V>>,XIterable<KeyValue<K,V>>,XJoinable<KeyValue<K,V>>,XProcessingCollection<KeyValue<K,V>>,XProcessingMap<K,V>,XProcessingSet<KeyValue<K,V>>,XPutGetCollection<KeyValue<K,V>>,XPutGetMap<K,V>,XPutGetSet<KeyValue<K,V>>,XPuttingCollection<KeyValue<K,V>>,XPuttingMap<K,V>,XPuttingSet<KeyValue<K,V>>,XRemovingCollection<KeyValue<K,V>>,XRemovingMap<K,V>,XRemovingSet<KeyValue<K,V>>,XSet<KeyValue<K,V>>
- All Known Subinterfaces:
XBasicTable<K,V>,XChart<K,V>,XTable<K,V>
- All Known Implementing Classes:
EqHashTable,HashTable,LockedMap
public interface XMap<K,V> extends XProcessingMap<K,V>, XPutGetMap<K,V>, XSet<KeyValue<K,V>>
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceXMap.Bridge<K,V>static interfaceXMap.Creator<K,V>static interfaceXMap.EntriesBridge<K,V>static interfaceXMap.Keys<K,V>static interfaceXMap.Satellite<K,V>static interfaceXMap.Values<K,V>Nested classes/interfaces inherited from interface one.microstream.collections.types.XIterable
XIterable.Executor<E>Nested classes/interfaces inherited from interface one.microstream.collections.types.XRemovingMap
XRemovingMap.Factory<K,V>Nested classes/interfaces inherited from interface one.microstream.collections.types.XSet
XSet.Factory<E> -
Method Summary
Modifier and Type Method Description booleanadd(K key, V value)Adds the passed key and value as an entry if key is not yet contained.XMap<K,V>addAll(XGettingCollection<? extends KeyValue<K,V>> elements)XMap<K,V>addAll(KeyValue<K,V>... elements)XMap<K,V>addAll(KeyValue<K,V>[] elements, int srcStartIndex, int srcLength)XMap<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.Vget(K key)XImmutableMap<K,V>immure()Provides an instance of an immutable collection type with equal behavior and data as this instance.XMap.Keys<K,V>keys()booleannullKeyAllowed()booleannullValuesAllowed()XMap.EntriesBridge<K,V>old()XMap.Bridge<K,V>oldMap()booleanput(K key, V value)Ensures the passed key and value to be contained as an entry in the map.XMap<K,V>putAll(KeyValue<K,V>... elements)Ensures the passed key-value-pairs to be contained as entries in the map.XMap<K,V>putAll(KeyValue<K,V>[] elements, int srcStartIndex, int srcLength)Ensures the passed key-value-pairs to be contained as entries in the map.KeyValue<K,V>putGet(K key, V value)Ensures the passed key and value to be contained as an entry in the map.VsearchValue(Predicate<? super K> keyPredicate)booleanset(K key, V value)Sets the passed key and value to an appropriate entry if one can be found.KeyValue<K,V>setGet(K key, V value)Sets the passed key and value to an appropriate entry if one can be found.booleanvaluePut(K sampleKey, V value)Ensures the passed value to be either set to an existing entry equal to sampleKey or inserted as a new one.VvaluePutGet(K sampleKey, V value)Ensures the passed value to be either set to an existing entry appropriate to sampleKey or inserted as a new one.XMap.Values<K,V>values()booleanvalueSet(K sampleKey, V value)Sets only the passed value to an existing entry appropriate to the passed sampleKey.VvalueSetGet(K sampleKey, V value)Sets only the passed value to an existing entry appropriate to the passed sampleKey.Methods inherited from interface one.microstream.collections.interfaces.CapacityCarrying
isFull, maximumCapacity, remainingCapacityMethods inherited from interface one.microstream.collections.interfaces.CapacityExtendable
currentCapacity, currentFreeCapacity, ensureCapacity, ensureFreeCapacityMethods inherited from interface one.microstream.collections.interfaces.ExtendedCollection
nullAllowedMethods inherited from interface one.microstream.collections.types.XAddGetMap
addGet, ensure, substituteMethods inherited from interface one.microstream.collections.types.XAddingCollection
accept, add, nullAddMethods inherited from interface one.microstream.collections.types.XGettingCollection
applies, contains, containsAll, containsId, containsSearched, copyTo, count, countBy, distinct, distinct, equality, equals, equals, equalsContent, except, filterTo, get, hashCode, hasVolatileElements, intersect, intSize, iterator, join, max, min, nullContained, search, seek, size, toArray, toArray, unionMethods inherited from interface one.microstream.collections.types.XProcessingCollection
fetch, iterate, moveTo, pinch, removeBy, removeDuplicates, retrieve, retrieveByMethods inherited from interface one.microstream.collections.types.XRemovingCollection
clear, consolidate, nullRemove, optimize, remove, removeAll, removeDuplicates, removeOne, retainAll, truncate
-
Method Details
-
keys
- Specified by:
keysin interfaceXGettingMap<K,V>- Specified by:
keysin interfaceXProcessingMap<K,V>
-
values
XMap.Values<K,V> values()- Specified by:
valuesin interfaceXGettingMap<K,V>- Specified by:
valuesin interfaceXProcessingMap<K,V>
-
old
XMap.EntriesBridge<K,V> old()- Specified by:
oldin interfaceXGettingCollection<K>- Specified by:
oldin interfaceXGettingMap<K,V>
-
oldMap
XMap.Bridge<K,V> oldMap()- Specified by:
oldMapin interfaceXGettingMap<K,V>
-
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 interfaceXAddGetCollection<K>- Specified by:
copyin interfaceXAddGetSet<K>- Specified by:
copyin interfaceXCollection<K>- Specified by:
copyin interfaceXGettingCollection<K>- Specified by:
copyin interfaceXGettingMap<K,V>- Specified by:
copyin interfaceXGettingSet<K>- Specified by:
copyin interfaceXProcessingMap<K,V>- Specified by:
copyin interfaceXProcessingSet<K>- Specified by:
copyin interfaceXPutGetCollection<K>- Specified by:
copyin interfaceXPutGetSet<K>- Specified by:
copyin interfaceXSet<K>- Returns:
- a copy of this list
-
nullKeyAllowed
boolean nullKeyAllowed()- Specified by:
nullKeyAllowedin interfaceXAddingMap<K,V>- Specified by:
nullKeyAllowedin interfaceXGettingMap<K,V>
-
nullValuesAllowed
boolean nullValuesAllowed()- Specified by:
nullValuesAllowedin interfaceXAddingMap<K,V>- Specified by:
nullValuesAllowedin interfaceXGettingMap<K,V>
-
add
Adds the passed key and value as an entry if key is not yet contained. Return value indicates new entry.- Specified by:
addin interfaceXAddingMap<K,V>- Parameters:
key- to addvalue- to add- Returns:
trueif element was added;falseif not
-
put
Ensures the passed key and value to be contained as an entry in the map.- Specified by:
putin interfaceXPuttingMap<K,V>- Parameters:
key- to addvalue- to add- Returns:
trueif element was added;falseif not
-
set
Sets the passed key and value to an appropriate entry if one can be found.- Specified by:
setin interfaceXAddingMap<K,V>- Parameters:
key- to find element to changevalue- to set- Returns:
trueif element was changed;falseif not
-
putGet
Ensures the passed key and value to be contained as an entry in the map.- Specified by:
putGetin interfaceXPutGetMap<K,V>- Parameters:
key- to addvalue- to add- Returns:
- the old value or
null
-
setGet
Sets the passed key and value to an appropriate entry if one can be found.- Parameters:
key- to find element to changevalue- to set- Returns:
- the old value
-
valuePut
Ensures the passed value to be either set to an existing entry equal to sampleKey or inserted as a new one.- Specified by:
valuePutin interfaceXPuttingMap<K,V>- Parameters:
sampleKey- to find the an existing elementvalue- to insert- Returns:
trueif element was changed;falseif not
-
valueSet
Sets only the passed value to an existing entry appropriate to the passed sampleKey.- Specified by:
valueSetin interfaceXAddingMap<K,V>- Parameters:
sampleKey- to find the an existing elementvalue- to set- Returns:
trueif element was changed;falseif not
-
valuePutGet
Ensures the passed value to be either set to an existing entry appropriate to sampleKey or inserted as a new one.- Parameters:
sampleKey- to find the an existing elementvalue- to add- Returns:
- the old value
-
valueSetGet
Sets only the passed value to an existing entry appropriate to the passed sampleKey.- Parameters:
sampleKey- to find the an existing elementvalue- to add- Returns:
- the old value
-
get
- Specified by:
getin interfaceXGettingMap<K,V>
-
searchValue
- Specified by:
searchValuein interfaceXGettingMap<K,V>
-
immure
XImmutableMap<K,V> immure()Description copied from interface:XGettingMapProvides 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 interfaceXGettingMap<K,V>- Specified by:
immurein interfaceXGettingSet<K>- Specified by:
immurein interfaceXProcessingSet<K>- Returns:
- an immutable copy of this collection instance.
-
putAll
Ensures the passed key-value-pairs to be contained as entries in the map. A return value indicates a new entry.- Specified by:
putAllin interfaceXCollection<K>- Specified by:
putAllin interfaceXPutGetCollection<K>- Specified by:
putAllin interfaceXPutGetSet<K>- Specified by:
putAllin interfaceXPuttingCollection<K>- Specified by:
putAllin interfaceXPuttingSet<K>- Specified by:
putAllin interfaceXSet<K>- Parameters:
elements- to add- Returns:
- this
-
putAll
Ensures the passed key-value-pairs to be contained as entries in the map. Only the elements with indizes from the srcStartIndex to the srcStartIndex+srcLength are put in the collection.
A return value indicates a new entry.- Specified by:
putAllin interfaceXCollection<K>- Specified by:
putAllin interfaceXPutGetCollection<K>- Specified by:
putAllin interfaceXPutGetSet<K>- Specified by:
putAllin interfaceXPuttingCollection<K>- Specified by:
putAllin interfaceXPuttingSet<K>- Specified by:
putAllin interfaceXSet<K>- Parameters:
elements- to addsrcStartIndex- start index of elements-array to add to collectionsrcLength- length of elements-array to add to collection- Returns:
- this
-
addAll
- Specified by:
addAllin interfaceXAddGetCollection<K>- Specified by:
addAllin interfaceXAddGetSet<K>- Specified by:
addAllin interfaceXAddingCollection<K>- Specified by:
addAllin interfaceXAddingSet<K>- Specified by:
addAllin interfaceXCollection<K>- Specified by:
addAllin interfaceXPutGetCollection<K>- Specified by:
addAllin interfaceXPutGetSet<K>- Specified by:
addAllin interfaceXPuttingSet<K>- Specified by:
addAllin interfaceXSet<K>
-
addAll
- Specified by:
addAllin interfaceXAddGetCollection<K>- Specified by:
addAllin interfaceXAddGetSet<K>- Specified by:
addAllin interfaceXAddingCollection<K>- Specified by:
addAllin interfaceXAddingSet<K>- Specified by:
addAllin interfaceXCollection<K>- Specified by:
addAllin interfaceXPutGetCollection<K>- Specified by:
addAllin interfaceXPutGetSet<K>- Specified by:
addAllin interfaceXPuttingSet<K>- Specified by:
addAllin interfaceXSet<K>
-
addAll
- Specified by:
addAllin interfaceXAddGetCollection<K>- Specified by:
addAllin interfaceXAddGetSet<K>- Specified by:
addAllin interfaceXAddingCollection<K>- Specified by:
addAllin interfaceXAddingSet<K>- Specified by:
addAllin interfaceXCollection<K>- Specified by:
addAllin interfaceXPutGetCollection<K>- Specified by:
addAllin interfaceXPutGetSet<K>- Specified by:
addAllin interfaceXPuttingSet<K>- Specified by:
addAllin interfaceXSet<K>
-