import { PeekableDeque, SyncDeque } from '../deque.js'; import { MaybeAsyncReadonlyMap } from '../map.js'; /** A double-ended queue using a circular buffer. */ export declare class ArrayDeque implements MaybeAsyncReadonlyMap, PeekableDeque, SyncDeque, Iterable { /** The initial capacity. */ private _capacity; /** The resize factor. When the buffer is full, it will resize to resizeFactor * capacity. */ private readonly resizeFactor; private buffer; private frontIdx; private backIdx; constructor( /** The initial capacity. */ _capacity?: number, /** The resize factor. When the buffer is full, it will resize to resizeFactor * capacity. */ resizeFactor?: number); get [Symbol.toStringTag](): string; /** Returns the current capacity of this {@link ArrayDeque}. */ get capacity(): number; /** Returns the size of this {@link ArrayDeque}. */ get size(): number; front(): T | undefined; back(): T | undefined; get(i: number): T | undefined; has(index: number): boolean; /** Clears this {@link ArrayDeque}. */ clear(): void; /** Adds an element to the beginning of this {@link ArrayDeque}. */ unshift(item: T): void; /** Removes and returns the first element of this {@link ArrayDeque}, or undefined if empty. */ shift(): T | undefined; /** Adds an element to the end of this {@link ArrayDeque}. */ push(item: T): void; /** Removes and returns the last element of this {@link ArrayDeque}, or undefined if empty. */ pop(): T | undefined; /** * Resizes this {@link ArrayDeque} to the new capacity. * By default, it expands to 2x the current capacity. * Does nothing if new capacity is less than current size. */ resize(newCapacity?: number): void; entries(): IterableIterator<[number, T]>; keys(): IterableIterator; values(): IterableIterator; [Symbol.iterator](): IterableIterator; private isEmpty; private isFull; } //# sourceMappingURL=arraydeque.d.ts.map