class ProximityMapBuilder<K,V>
Mutable builder used to efficiently construct new immutable {@link ProximityMap} instances.
The builder stores entries in an internal HashMap.Builder and only wraps the result into a ProximityMap when {@link ProximityMapBuilder.build | build} (or {@link ProximityMapBuilder.buildMapValues | buildMapValues}) is called.
Type parameters
| Name | Description |
|---|---|
| K | the key type |
| V | the value type |
Properties
addEntries
undocumented
addEntriesDefinition
addEntries: (entries: StreamSource<readonly [K, V]>) => boolean;
buildMapValues
undocumented
buildMapValuesDefinition
buildMapValues: <V2>(mapFun: (value: V, key: K) => V2) => ProximityMap<K, V2>;
forEach
undocumented
forEachDefinition
forEach: (f: (entry: readonly [K, V], index: number, halt: () => void) => void, options?: {
state?: TraverseState;
}) => void;
get
Applying get() to the Builder does NOT apply the proximity algorithm - which would be pointless at this construction stage; the internal, hash-based builder is queried instead
getget() to the Builder does NOT apply the proximity algorithm - which would be pointless at this construction stage; the internal, hash-based builder is queried insteadmodifyAt
undocumented
modifyAtremoveKey
undocumented
removeKeyremoveKeys
undocumented
removeKeysDefinition
removeKeys: <UK = K>(keys: StreamSource<RelatedTo<K, UK>>) => boolean;
updateAt
undocumented
updateAtDefinition
updateAt: <O>(key: K, update: RMapBase.Update<V>, otherwise?: OptLazy<O>) => V | O;