Пример #1
0
 public void append(MyMapNode newNode)
 {
     if (this.head == null)
     {
         this.head = newNode;
     }
     if (this.tail == null)
     {
         this.tail = newNode;
     }
     else
     {
         MyMapNode tempNode = this.tail;
         this.tail = newNode;
         tempNode.setNext(newNode);
     }
 }
Пример #2
0
 public void insert(MyMapNode myNode, MyMapNode newNode)
 {
     this.head.setNext(myNode);
     myNode.setNext(newNode);
 }