/******************************************************************** * @author: Kaven * @email: kaven@wuwenkai.com * @website: http://blog.kaven.xyz * @file: [Kaven-Basic] /src/libs/class/KavenLinkedList.ts * @create: 2019-03-21 20:41:28.173 * @modify: 2025-07-01 17:41:03.101 * @version: 6.0.0 * @times: 47 * @lines: 287 * @copyright: Copyright © 2019-2025 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 { IKavenLinkedList } from "../interface/IKavenLinkedList"; import { IRandom } from "../interface/IRandom"; import { TEqualityComparer } from "../type/basic"; import { KavenLinkedListNode } from "./KavenLinkedListNode"; /** * Represents a doubly-Linked circular list. * @summary In this type of linked list, the next of the last node will point to the first node * and the previous pointer of the first node will point to the last node. * @since 1.1.19 * @version 2019-03-22 */ export declare class KavenLinkedList implements IKavenLinkedList, IRandom { EqualityComparer?: TEqualityComparer; protected head?: KavenLinkedListNode; protected count: number; constructor(); get Last(): KavenLinkedListNode | undefined; get First(): KavenLinkedListNode | undefined; get Count(): number; AddAfter(node: KavenLinkedListNode, value: T): KavenLinkedListNode; AddBefore(node: KavenLinkedListNode, value: T): KavenLinkedListNode; AddFirst(value: T): KavenLinkedListNode; AddLast(value: T): KavenLinkedListNode; Clear(): void; Contains(value: T): boolean; Find(value: T): KavenLinkedListNode | undefined; FindLast(value: T): KavenLinkedListNode | undefined; Remove(value: T): boolean; RemoveFirst(): void; RemoveLast(): void; Random(): T | undefined; protected insertNodeToEmptyList(newNode: KavenLinkedListNode): void; protected insertNodeBefore(node: KavenLinkedListNode, newNode: KavenLinkedListNode): void; protected removeNode(node: KavenLinkedListNode): void; protected isEqual(a: T, b: T): boolean; } //# sourceMappingURL=KavenLinkedList.d.ts.map