interface ProximityMap.Builder<K,V>
A mutable ProximityMap
builder used to efficiently create new immutable instances. See the Map documentation and the ProximityMap.Builder API documentation
Extends: RMapBase.Builder<K,V,Tp>
Implemented by: ProximityMapBuilder<K,V>
Type parameters
Name | Description |
---|---|
K | the key type |
V | the value type |
Properties
context
Returns the context
associated to this collection instance.
context
context
associated to this collection instance.isEmpty
Returns true if there are no entries in the builder.
isEmpty
size
Returns the amount of entries in the builder.
size
Methods
addEntries
Adds given entries
to the builder.
addEntries
entries
to the builder.addEntry
Adds given entry
to the builder.
addEntry
entry
to the builder.build
Returns an immutable collection instance containing the entries in this builder.
build
buildMapValues
Returns an immutable instance of the entries in this builder, with given mapValues
function applied to all the values in the entries.
buildMapValues
mapValues
function applied to all the values in the entries.forEach
Performs given function f
for each entry of the builder.
forEach
f
for each entry of the builder.get
Returns the value associated with the given key
, or given otherwise
value if the key is not in the collection.
get
key
, or given otherwise
value if the key is not in the collection.hasKey
Returns true if the given key
is present in the builder.
hasKey
key
is present in the builder.modifyAt
Modifies or creates the builder entry with given atKey
as its key according to given options
.
modifyAt
atKey
as its key according to given options
.removeKey
Removes the entry with given key
from the builder.
removeKey
key
from the builder.removeKeys
Removes the entries in the given keys
StreamSource
from the builder.
removeKeys
keys
StreamSource
from the builder.set
Associates given key
with given value
in the builder.
set
key
with given value
in the builder.updateAt
Updates the value in the builder associated with given key
according to given update
value or function.
updateAt
key
according to given update
value or function.