/*! Copyright 2018 Ron Buckton (rbuckton@chronicles.org) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /** @module "iterable-query" */ import { Equaler } from '@esfx/equatable'; import { Queryable, Grouping } from "./types"; export declare class Lookup implements Iterable> { private _entries; private _source; /** * Creates a new Lookup for the provided groups. * * @param entries A map containing the unique groups of values. */ constructor(entries: Queryable<[K, Queryable]>, keyEqualer?: Equaler); /** * Gets the number of unique keys. */ readonly size: number; /** * * @param key A key. * Gets a value indicating whether any group has the provided key. */ has(key: K): boolean; /** * Gets the group for the provided key. * * @param key A key. */ get(key: K): Iterable; /** * Creates a `Query` that maps each group in the Lookup. * * @param selector A callback used to select results for each group. */ applyResultSelector(selector: (key: K, elements: Queryable) => R): Iterable; [Symbol.iterator](): Iterator>; } //# sourceMappingURL=lookup.d.ts.map