import { Collection, Element, ImmutableCollection } from "./Collection";
/**
 * An immutable collection designed for holding elements prior to processing. Besides basic `ImmutableCollection` operations,
 * immutable queues provide additional extraction and inspection operations.
 */
export interface ImmutableQueue<T> extends ImmutableCollection<T> {
    /** Retrieves, but does not remove, the head of this queue, or returns `undefined` if this queue is empty */
    element(): Element<T> | undefined;
    /** Retrieves, but does not remove, the head of this queue, or returns `undefined` if this queue is empty  */
    peek(): Element<T> | undefined;
}
/**
 * A mutable collection designed for holding elements prior to processing. Besides basic `Collection` operations, queues provide additional insertion,
 * extraction, and inspection operations.
 */
export interface Queue<T> extends ImmutableQueue<T>, Collection<T> {
    /** Inserts the specified element into this queue if it is possible */
    offer(value: Element<T>): boolean;
    /** Retrieves and removes the head of this queue, or returns `undefined` if this queue is empty */
    poll(): Element<T> | undefined;
    /** Retrieves and removes the head of this list, or returns `undefined` if this list object is empty */
    removeFirst(): Element<T> | undefined;
}
