import { BrsValue, ValueKind, BrsString, BrsBoolean, BrsInvalid } from "../BrsType"; import { BrsComponent, BrsIterable } from "./BrsComponent"; import { BrsType } from ".."; /** A member of an `AssociativeArray` in BrightScript. */ export interface AAMember { /** The member's name. */ name: BrsString; /** The value associated with `name`. */ value: BrsType; } export declare class RoAssociativeArray extends BrsComponent implements BrsValue, BrsIterable { readonly kind = ValueKind.Object; elements: Map; enumIndex: number; /** Maps lowercased element name to original name used in this.elements. * Main benefit of it is fast, case-insensitive access. */ keyMap: Map>; private modeCaseSensitive; constructor(elements: AAMember[]); toString(parent?: BrsType): string; equalTo(other: BrsType): BrsBoolean; getValue(): Map; getElements(): BrsString[]; getValues(): BrsType[]; get(index: BrsType, isCaseSensitive?: boolean): BrsType; set(index: BrsType, value: BrsType, isCaseSensitive?: boolean): BrsInvalid; getNext(): string; updateNext(): void; /** if AA is in insensitive mode, it means that we should do insensitive search of real key */ private findElementKey; private findElement; /** Removes all elements from the associative array */ private clear; /** Removes a given item from the associative array */ private delete; /** Given a key and value, adds an item to the associative array if it doesn't exist * Or replaces the value of a key that already exists in the associative array */ private addreplace; /** Returns the number of items in the associative array */ private count; /** Returns a boolean indicating whether or not a given key exists in the associative array */ private doesexist; /** Appends a new associative array to another. If two keys are the same, the value of the original AA is replaced with the new one. */ private append; /** Returns an array of keys from the associative array in lexicographical order */ private keys; /** Returns an array of values from the associative array in lexicographical order */ private items; /** Given a key, returns the value associated with that key. * This method is case insensitive either-or case sensitive, depends on whether `setModeCasesensitive` was called or not. */ private lookup; /** Given a key, returns the value associated with that key. This method always is case insensitive. */ private lookupCI; /** Changes the sensitive case method for lookups */ private setmodecasesensitive; /** Returns true if enumeration contains no elements, false otherwise */ private isEmpty; /** Checks whether the current position is not past the end of the enumeration. */ private isNext; /** Resets the current position to the first element of the enumeration. */ private reset; /** Increments the position of an enumeration. */ private next; }