import { ReplicatedData } from '.'; import { Serializable } from '../serializable'; /** * A replicated multimap (map of sets). * * A replicated map that maps keys to values, where each key may be associated with multiple values. * * @typeParam Key - Type of keys for the Replicated Multi-Map * @typeParam Value - Type of values for the Replicated Multi-Map * * @public */ export declare class ReplicatedMultiMap implements ReplicatedData { private entries; private removed; private cleared; private EmptySet; /** * Get the values for the given key. * * @param key - The key of the entry * @returns The current values at the given key, or an empty Set */ get: (key: Key) => Set; /** * Store a key-value pair. * * @param key - The key of the entry * @param value - The value to add to the entry * @returns This multimap */ put: (key: Key, value: Value) => ReplicatedMultiMap; /** * Store multiple values for a key. * * @param key - The key of the entry * @param values - The values to add to the entry * @returns This multimap */ putAll: (key: Key, values: Iterable) => ReplicatedMultiMap; /** * Delete a single key-value pair for the given key and value. * * @param key - The key of the entry * @param value - The value to remove from the entry * @returns This multimap */ delete: (key: Key, value: Value) => ReplicatedMultiMap; /** * Delete all values associated with the given key. * * @param key - The key of the entry * @returns This multimap */ deleteAll: (key: Key) => ReplicatedMultiMap; /** * Check whether this multimap contains at least one value for the given key. * * @param key - The key to check * @returns True if this multimap contains any values for the given key */ has: (key: Key) => boolean; /** * Check whether this multimap contains the given value associated with the given key. * * @param key - The key to check * @param value - The value to check * @returns True if the key-value pair is in this multimap */ hasValue: (key: Key, value: Value) => boolean; /** * The total number of values stored in the multimap. */ get size(): number; /** * The number of keys with values stored in the multimap. */ get keysSize(): number; /** * Return an (iterable) iterator of the keys of this multimap. * * @returns (iterable) iterator of multimap keys */ keys: () => IterableIterator; /** * Clear all entries from this multimap. * * @returns This multimap */ clear: () => ReplicatedMultiMap; private getOrCreateValues; toString: () => string; }