export class DoubleLinkNode{ constructor(private value: T, private next: DoubleLinkNode = null, private prev: DoubleLinkNode = null){ } public get Value(){ return this.value; } public get Next(){ return this.next; } public get Prev(){ return this.prev; } public setValue(value: T){ this.value = value; } public setNext(node: DoubleLinkNode){ this.next = node; if (node){ node.prev = this; } } public toString(){ return `${this.value}`; } }