UNPKG

349 BJavaScriptView Raw
1export class DoubleLinkListNode {
2 constructor(value) {
3 this.value = value;
4 }
5 setNext(node) {
6 this.next = node;
7 }
8 setPre(node) {
9 this.pre = node;
10 }
11 get Next() {
12 return this.next;
13 }
14 get Prev() {
15 return this.pre;
16 }
17 toString() {
18 return `${this.value}`;
19 }
20}