Adds a key-value pair to the map.
Adds a key-value pair to the map.
If a key equal to the key from the pair already exists in the map, the existing mapping is removed.
Removes a key-value pair from the map.
Removes a key-value pair from the map.
A key-value pair is removed iff the same key-value pair already exists in the map.
Creates an event stream that emits newly inserted keys.
Creates an event stream that emits newly inserted keys.
event stream with newly inserted keys
Returns the value at the specified key, or throws an exception if there is none.
Gets the value at the specified key, or nil
if there is none.
Returns an event stream that emits values stored at a specific key.
Returns an event stream that emits values stored at a specific key.
Each time that the value at the key is updated, an event is emitted. The initial
value is emitted to the event stream when subscribing to the event stream. If
there is no value associated with the key, or a value was just removed, then nil
is emitted.
key for which to emit values
Removes all elements from the map.
Incrementally collects and transforms elements on which the function is defined.
Incrementally collects and transforms elements on which the function is defined.
The partial function must be an injection.
Filters and maps the values for which the partial function is defined.
Filters and maps the values for which the partial function is defined.
Checks if the given key exists in the map.
Stream with the current number of elements satisfying a predicate.
Stream with the current number of elements satisfying a predicate.
Stream with boolean values indicating if some element satisfied a predicate.
Stream with boolean values indicating if some element satisfied a predicate.
Incrementally filters elements from the current container.
Incrementally filters elements from the current container.
Stream with boolean values indicating if all elements satisfy a predicate.
Stream with boolean values indicating if all elements satisfy a predicate.
Traverses the elements of the container.
Traverses the elements of the container.
Optionally gets the value associated to the specified key.
Event stream with inserted elements.
Event stream with inserted elements.
Incrementally maps elements from the current container.
Incrementally maps elements from the current container.
Function f
for the map must be an injection, that is, for any two elements
x
and y
that are not equal (x != y
), f(x)
**cannot be equal to** f(y)
.
A stream of modifications events.
A stream of modifications events.
This stream is called immediately after the inserts
and removes
event streams
emit values, and immediately before a modification method returns. Together with
inserts
and removes
, it can be used to create event streams that, for example,
track only the insertion of the new keys into the map, or modification of existing
keys in the map.
event stream with an event emitted per modification operation
Denotes the absence of values at various keys.
Converts this map into a container of key-value pairs.
Converts this map into a container of key-value pairs.
Note: this operation boxes the keys and values into tuple objects.
a container with the key-value pairs in this map
Stream with the reduction of the current set of elements in this container.
Stream with the reduction of the current set of elements in this container.
Parameters op
, inv
and z
must for an Abelian group, that is, z
is the
neutral element, and inv
is the inverse operation of op
, in the sense that
inv(op(s, t), t) == op(inv(s, t), t) == s
is always true.
Removes the mapping at the specified key.
Event stream with removed elements.
Event stream with removed elements.
Returns the number of elements in the container.
Returns the number of elements in the container.
Stream with the sizes of this container.
Stream with the sizes of this container.
Incrementally copies this container to another container type.
Incrementally copies this container to another container type.
Materializes another container, such that all the elements from this container are visible in the target container.
Users may call unsubscribe
on the resulting container to stop incremental
updates. Losing the container and failing to call unsubscribe
may result in a
time leak.
Creates a signal that is the fold of the elements in the container.
Creates a signal that is the fold of the elements in the container.
Neutral element z
and the associative operator op
must form a monoid.
Creates a signal that is the commutative fold of the elements in the container.
Creates a signal that is the commutative fold of the elements in the container.
Neutral element z
and the commutative, associative operator op
must for a
monoid.
Converts this reactive map into another reactive map.
Converts this reactive map into another reactive map.
Converts this container of signals into a signal aggregate.
Converts this container of signals into a signal aggregate.
Incrementally produces a union of the elements in the two containers.
Incrementally produces a union of the elements in the two containers.
This container combinator creates a subscription on the source combinators, so
calling unsubscribe
will stop incremental updates.
Unsubscribes the container from its input event streams.
Unsubscribes the container from its input event streams.
Updates the value at the specific key.
Creates an stream that emits updates to keys that were already in the map.
Creates an stream that emits updates to keys that were already in the map.
event stream with modified keys that had already been in the map
A reactive hash map.
In addition to standard
inserts
andremoves
, and other container event streams, reactive hash maps expose event streams with elements at specific keys.type of the keys in the map, specialized
type of the values in the map, must be a reference parameter