Interface XMap<K,V>
- 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)
XMap<K,V>
putAll(KeyValue<K,V>[] elements, int srcStartIndex, int srcLength)
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 appropriate 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
-value
-
-
put
Ensures the passed key and value to be contained as an entry in the map. Return value indicates new entry.- Specified by:
put
in interfaceXPuttingMap<K,V>
- Parameters:
key
-value
-
-
set
Sets the passed key and value to an appropriate entry if one can be found. Return value indicates entry change.- Specified by:
set
in interfaceXAddingMap<K,V>
- Parameters:
key
-value
-
-
putGet
Ensures the passed key and value to be contained as an entry in the map. Returns the old value ornull
.- Specified by:
putGet
in interfaceXPutGetMap<K,V>
- Parameters:
key
-value
-
-
setGet
Sets the passed key and value to an appropriate entry if one can be found. Returns the old value.- Parameters:
key
-value
-
-
valuePut
Ensures the passed value to be either set to an existing entry appropriate to sampleKey or inserted as a new one.- Specified by:
valuePut
in interfaceXPuttingMap<K,V>
- Parameters:
sampleKey
-value
-
-
valueSet
Sets only the passed value to an existing entry appropriate to the passed sampleKey. Returns value indicates change.- Specified by:
valueSet
in interfaceXAddingMap<K,V>
- Parameters:
sampleKey
-value
-
-
valuePutGet
Ensures the passed value to be either set to an existing entry appropriate to sampleKey or inserted as a new one. -
valueSetGet
Sets only the passed value to an existing entry appropriate to the passed sampleKey. 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
- 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>
-
putAll
- 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>
-
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>
-