/********************************************************************
 * @author:      Kaven
 * @email:       kaven@wuwenkai.com
 * @website:     http://kavenblog.com
 * @file:        [Kaven-Basic] /src/libs/Interfaces.ts
 * @create:      2018-08-30 16:07:34.049
 * @modify:      2019-04-11 11:19:16.467
 * @version:     1.1.20
 * @times:       26
 * @lines:       226
 * @copyright:   Copyright © 2018 Kaven. All Rights Reserved.
 * @description: [description]
 * @license:
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 ********************************************************************/
import { BitString } from "./BitString";
import { KavenLinkedListNode } from "./data_structures/KavenLinkedListNode";
import { TAcquiredData } from "./Types";
export interface ICache {
    name: string;
    value: any;
    absoluteExpiration: Date;
    IsExpired(): boolean;
}
export interface IndexObject {
    [index: string]: any;
}
export interface IMIME {
    Extension: string;
    KindOfDocument: string;
    Type: string;
}
export interface IKavenStack<T> {
    /**
     * Gets the number of elements contained in the stack.
     */
    Count: number;
    /**
     * Removes all objects from the stack.
     */
    Clear(): void;
    /**
     * Determines whether an element is in the stack.
     * @param item
     * @returns true if item is found in the stack; otherwise, false.
     */
    Contains(item: T): boolean;
    /**
     * Returns the object at the top of the stack without removing it.
     * @returns The object at the top of the stack.
     */
    Peek(): T | undefined;
    /**
     * Removes and returns the object at the top of the stack.
     * @returns The object removed from the top of the stack.
     */
    Pop(): T | undefined;
    /**
     * Inserts an object at the top of the stack.
     * @param item
     */
    Push(item: T): void;
    /**
     * Copies the stack to a new array.
     * @returns A new array containing copies of the elements of the stack.
     */
    ToArray(): T[];
}
export interface IKavenLinkedList<T> {
    /**
     * Gets the last node of the KavenLinkedList.
     * @returns The last KavenLinkedListNode of the KavenLinkedList.
     */
    Last: KavenLinkedListNode<T> | undefined;
    /**
     * Gets the first node of the KavenLinkedList.
     * @returns The first KavenLinkedListNode of the KavenLinkedList.
     */
    First: KavenLinkedListNode<T> | undefined;
    /**
     * Gets the number of nodes actually contained in the KavenLinkedList.
     * @returns The number of nodes actually contained in the KavenLinkedList.
     */
    Count: number;
    /**
     * Adds a new node containing the specified value after the specified existing node in the KavenLinkedList.
     * @param node The KavenLinkedListNode after which to insert newNode.
     * @param value The value to add to the KavenLinkedList.
     * @returns The new KavenLinkedListNode containing value.
     */
    AddAfter(node: KavenLinkedListNode<T>, value: T): KavenLinkedListNode<T>;
    /**
     * Adds a new node containing the specified value before the specified existing node in the KavenLinkedList.
     * @param node The KavenLinkedListNode before which to insert a new KavenLinkedListNode containing value.
     * @param value The value to add to the KavenLinkedList.
     * @returns The new KavenLinkedListNode containing value.
     */
    AddBefore(node: KavenLinkedListNode<T>, value: T): KavenLinkedListNode<T>;
    /**
     * Adds a new node containing the specified value at the start of the KavenLinkedList.
     * @param value The value to add at the start of the KavenLinkedList.
     * @returns The new KavenLinkedListNode containing value.
     */
    AddFirst(value: T): KavenLinkedListNode<T>;
    /**
     * Adds a new node containing the specified value at the end of the KavenLinkedList.
     * @param value The value to add at the end of the KavenLinkedList.
     * @returns The new KavenLinkedListNode containing value.
     */
    AddLast(value: T): KavenLinkedListNode<T>;
    /**
     * Removes all nodes from the KavenLinkedList.
     */
    Clear(): void;
    /**
     * Determines whether a value is in the KavenLinkedList.
     * @param value The value to locate in the KavenLinkedList.
     * @returns true if value is found in the KavenLinkedList; otherwise, false.
     */
    Contains(value: T): boolean;
    /**
     * Finds the first node that contains the specified value.
     * @param value he value to locate in the KavenLinkedList.
     * @returns The first KavenLinkedListNode that contains the specified value, if found; otherwise, undefined.
     */
    Find(value: T): KavenLinkedListNode<T> | undefined;
    /**
     * Finds the last node that contains the specified value.
     * @param value The value to locate in the KavenLinkedList.
     * @returns The last KavenLinkedListNode that contains the specified value, if found; otherwise, undefined.
     */
    FindLast(value: T): KavenLinkedListNode<T> | undefined;
    /**
     * Removes the first occurrence of the specified value from the KavenLinkedList.
     * @param value The value to remove from the KavenLinkedList.
     * @returns true if the element containing value is successfully removed; otherwise, false.
     * This method also returns false if value was not found in the original KavenLinkedList.
     */
    Remove(value: T): boolean;
    /**
     * Removes the node at the start of the KavenLinkedList.
     */
    RemoveFirst(): void;
    /**
     * Removes the node at the end of the KavenLinkedList.
     */
    RemoveLast(): void;
}
export interface IRandom<T> {
    /**
     * @returns A random item in the collection without removing it.
     */
    Random(): T | undefined;
}
export interface ICyclicRedundancyCheck extends ICyclicRedundancyCheckModel {
    MakeTable(): BitString[];
    PrintTable(): void;
    Compute(str: string): BitString;
    ComputerWithoutTable(str: string): BitString;
}
export interface ICyclicRedundancyCheckModel {
    Width: number;
    Polynomial: BitString;
    InitialValue: BitString;
    FinalXORValue: BitString;
    InputReflected: boolean;
    ResultReflected: boolean;
}
export interface IAcquiredData {
    AcquiredData: TAcquiredData;
    TotalLengthInBytes: number;
    BlocksPerRead?: number;
}
//# sourceMappingURL=Interfaces.d.ts.map