1 23 24 29 42 43 48 49 package com.sun.enterprise.util.collection; 50 51 public class DListNode { 52 public Object object; 53 public DListNode prev; 54 public DListNode next; 55 56 public DListNode() { 57 } 58 59 public DListNode(Object obj) { 60 this.object = obj; 61 } 62 63 public void delink() { 64 prev.next = next; 65 next.prev = prev; 66 prev = next = null; 67 } 68 69 public void insertBefore(DListNode node) { 70 node.prev = prev; 71 node.next = this; 72 prev.next = node; 73 prev = node; 74 } 75 76 public void insertAfter(DListNode node) { 77 next.insertBefore(node); 78 } 79 80 public String toString() { 81 return "DListNode: " + object; 82 } 83 84 } 85 | Popular Tags |