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 interface
XMap.Bridge<K,V>
static interface
XMap.Creator<K,V>
static interface
XMap.EntriesBridge<K,V>
static interface
XMap.Keys<K,V>
static interface
XMap.Satellite<K,V>
static interface
XMap.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 boolean
add(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.V
get(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()
boolean
nullKeyAllowed()
boolean
nullValuesAllowed()
XMap.EntriesBridge<K,V>
old()
XMap.Bridge<K,V>
oldMap()
boolean
put(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.V
searchValue(Predicate<? super K> keyPredicate)
boolean
set(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.boolean
valuePut(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.V
valuePutGet(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()
boolean
valueSet(K sampleKey, V value)
Sets only the passed value to an existing entry appropriate to the passed sampleKey.V
valueSetGet(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, remainingCapacity
Methods inherited from interface one.microstream.collections.interfaces.CapacityExtendable
currentCapacity, currentFreeCapacity, ensureCapacity, ensureFreeCapacity
Methods inherited from interface one.microstream.collections.interfaces.ExtendedCollection
nullAllowed
Methods inherited from interface one.microstream.collections.types.XAddGetMap
addGet, ensure, substitute
Methods inherited from interface one.microstream.collections.types.XAddingCollection
accept, add, nullAdd
Methods 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, union
Methods inherited from interface one.microstream.collections.types.XProcessingCollection
fetch, iterate, moveTo, pinch, removeBy, removeDuplicates, retrieve, retrieveBy
Methods inherited from interface one.microstream.collections.types.XRemovingCollection
clear, consolidate, nullRemove, optimize, remove, removeAll, removeDuplicates, removeOne, retainAll, truncate
-
Method Details
-
keys
- Specified by:
keys
in interfaceXGettingMap<K,V>
- Specified by:
keys
in interfaceXProcessingMap<K,V>
-
values
XMap.Values<K,V> values()- Specified by:
values
in interfaceXGettingMap<K,V>
- Specified by:
values
in interfaceXProcessingMap<K,V>
-
old
XMap.EntriesBridge<K,V> old()- Specified by:
old
in interfaceXGettingCollection<K>
- Specified by:
old
in interfaceXGettingMap<K,V>
-
oldMap
XMap.Bridge<K,V> oldMap()- Specified by:
oldMap
in interfaceXGettingMap<K,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 interfaceXAddGetCollection<K>
- Specified by:
copy
in interfaceXAddGetSet<K>
- Specified by:
copy
in interfaceXCollection<K>
- Specified by:
copy
in interfaceXGettingCollection<K>
- Specified by:
copy
in interfaceXGettingMap<K,V>
- Specified by:
copy
in interfaceXGettingSet<K>
- Specified by:
copy
in interfaceXProcessingMap<K,V>
- Specified by:
copy
in interfaceXProcessingSet<K>
- Specified by:
copy
in interfaceXPutGetCollection<K>
- Specified by:
copy
in interfaceXPutGetSet<K>
- Specified by:
copy
in interfaceXSet<K>
- Returns:
- a copy of this list
-
nullKeyAllowed
boolean nullKeyAllowed()- Specified by:
nullKeyAllowed
in interfaceXAddingMap<K,V>
- Specified by:
nullKeyAllowed
in interfaceXGettingMap<K,V>
-
nullValuesAllowed
boolean nullValuesAllowed()- Specified by:
nullValuesAllowed
in interfaceXAddingMap<K,V>
- Specified by:
nullValuesAllowed
in 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:
add
in interfaceXAddingMap<K,V>
- Parameters:
key
- to addvalue
- to add- Returns:
true
if element was added;false
if not
-
put
Ensures the passed key and value to be contained as an entry in the map.- Specified by:
put
in interfaceXPuttingMap<K,V>
- Parameters:
key
- to addvalue
- to add- Returns:
true
if element was added;false
if not
-
set
Sets the passed key and value to an appropriate entry if one can be found.- Specified by:
set
in interfaceXAddingMap<K,V>
- Parameters:
key
- to find element to changevalue
- to set- Returns:
true
if element was changed;false
if not
-
putGet
Ensures the passed key and value to be contained as an entry in the map.- Specified by:
putGet
in 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:
valuePut
in interfaceXPuttingMap<K,V>
- Parameters:
sampleKey
- to find the an existing elementvalue
- to insert- Returns:
true
if element was changed;false
if not
-
valueSet
Sets only the passed value to an existing entry appropriate to the passed sampleKey.- Specified by:
valueSet
in interfaceXAddingMap<K,V>
- Parameters:
sampleKey
- to find the an existing elementvalue
- to set- Returns:
true
if element was changed;false
if 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:
get
in interfaceXGettingMap<K,V>
-
searchValue
- Specified by:
searchValue
in interfaceXGettingMap<K,V>
-
immure
XImmutableMap<K,V> immure()Description copied from interface:XGettingMap
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 interfaceXGettingCollection<K>
- Specified by:
immure
in interfaceXGettingMap<K,V>
- Specified by:
immure
in interfaceXGettingSet<K>
- Specified by:
immure
in 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:
putAll
in interfaceXCollection<K>
- Specified by:
putAll
in interfaceXPutGetCollection<K>
- Specified by:
putAll
in interfaceXPutGetSet<K>
- Specified by:
putAll
in interfaceXPuttingCollection<K>
- Specified by:
putAll
in interfaceXPuttingSet<K>
- Specified by:
putAll
in 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:
putAll
in interfaceXCollection<K>
- Specified by:
putAll
in interfaceXPutGetCollection<K>
- Specified by:
putAll
in interfaceXPutGetSet<K>
- Specified by:
putAll
in interfaceXPuttingCollection<K>
- Specified by:
putAll
in interfaceXPuttingSet<K>
- Specified by:
putAll
in 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:
addAll
in interfaceXAddGetCollection<K>
- Specified by:
addAll
in interfaceXAddGetSet<K>
- Specified by:
addAll
in interfaceXAddingCollection<K>
- Specified by:
addAll
in interfaceXAddingSet<K>
- Specified by:
addAll
in interfaceXCollection<K>
- Specified by:
addAll
in interfaceXPutGetCollection<K>
- Specified by:
addAll
in interfaceXPutGetSet<K>
- Specified by:
addAll
in interfaceXPuttingSet<K>
- Specified by:
addAll
in interfaceXSet<K>
-
addAll
- Specified by:
addAll
in interfaceXAddGetCollection<K>
- Specified by:
addAll
in interfaceXAddGetSet<K>
- Specified by:
addAll
in interfaceXAddingCollection<K>
- Specified by:
addAll
in interfaceXAddingSet<K>
- Specified by:
addAll
in interfaceXCollection<K>
- Specified by:
addAll
in interfaceXPutGetCollection<K>
- Specified by:
addAll
in interfaceXPutGetSet<K>
- Specified by:
addAll
in interfaceXPuttingSet<K>
- Specified by:
addAll
in interfaceXSet<K>
-
addAll
- Specified by:
addAll
in interfaceXAddGetCollection<K>
- Specified by:
addAll
in interfaceXAddGetSet<K>
- Specified by:
addAll
in interfaceXAddingCollection<K>
- Specified by:
addAll
in interfaceXAddingSet<K>
- Specified by:
addAll
in interfaceXCollection<K>
- Specified by:
addAll
in interfaceXPutGetCollection<K>
- Specified by:
addAll
in interfaceXPutGetSet<K>
- Specified by:
addAll
in interfaceXPuttingSet<K>
- Specified by:
addAll
in interfaceXSet<K>
-