UNPKG

1 kBTypeScriptView Raw
1import { Collection } from "../Collection";
2import CycleLinkList from "../cyclelinklist/CycleLinkList";
3import DoubleLinkList from "../doublelinklist/DoubleLinkList";
4import { LinkNode } from "./LinkNode";
5export declare class LinkList<T> extends Collection<LinkNode<T>> {
6 private headNode;
7 private tailNode;
8 private size;
9 constructor();
10 readonly Size: number;
11 append(value: T): LinkNode<T>;
12 prepend(value: T): LinkNode<T>;
13 private emptyList;
14 clear(): void;
15 deleteNode(arg: any): boolean;
16 findNode(arg: any): LinkNode<T>;
17 insertAfter(value: T, oriNode: LinkNode<T>): boolean;
18 getHeadNode(): LinkNode<T>;
19 getTailNode(): LinkNode<T>;
20 shift(): LinkNode<T>;
21 pop(): LinkNode<T>;
22 protected __iterate(fn: (item: LinkNode<T>, index: number) => void): void;
23 toString(): string;
24 static fromArray<K>(arr: Array<K>): LinkList<K>;
25 toDoubleLinkList(): DoubleLinkList<T>;
26 toCycleLinkList(): CycleLinkList<T>;
27}
28export default LinkList;