/**
 * @template Key, Value
 */
export class ImmutableObjectPool<Key, Value> {
    constructor({ capacity, perKeyCapacity }?: {
        capacity?: number;
        perKeyCapacity?: number;
    });
    /**
     * @readonly
     * @type {Signal<Key,Value>}
     */
    readonly onRemoved: Signal<Key, Value>;
    /**
     *
     * @type {HashMap<Key, CacheElement<Key,Value>[]>}
     */
    data: HashMap<Key, CacheElement<Key, Value>[]>;
    /**
     *
     * @type {CacheElement<Key,Value>|null}
     * @private
     */
    private __first;
    /**
     *
     * @type {CacheElement<Key,Value>|null}
     * @private
     */
    private __last;
    /**
     * How many items in total the pool can hold
     * @type {number}
     */
    capacity: number;
    /**
     * Maximum number of items that can be stored for the same key
     * @type {number}
     */
    perKeyCapacity: number;
    /**
     * Current number of elements in the pool
     * @type {number}
     */
    size: number;
    get(key: any): Value_1;
    /**
     * Removed all elements from cache
     * NOTE: {@link onRemoved} signal *does* get triggered for each element
     */
    clear(): void;
    /**
     *
     * @param {CacheElement<Key,Value>} el
     * @private
     */
    private __removeElement;
    add(key: any, value: any): boolean;
}
import Signal from "../../events/signal/Signal.js";
import { HashMap } from "../../collection/map/HashMap.js";
import { CacheElement } from "../../cache/CacheElement.js";
//# sourceMappingURL=ImmutableObjectPool.d.ts.map