/// Removes an object public void Remove(Object n) { DoublyNode p = Find(n); if (!(p.Flink == null)) { p.Blink.Flink = p.Flink; p.Flink.Blink = p.Blink; p.Flink = null; p.Blink = null; } }
/// Finds an object in the DoublyLinkedList and returns the DoublyNode private DoublyNode Find(Object item) { DoublyNode current = new DoublyNode(); current = header; while (header != item) { current = current.Flink; } return(current); }
/// Constructor for the DoublyNode accepting an object public DoublyNode(Object theElement) { Element = theElement; Flink = null; Blink = null; }
/// Constructor for the DoublyNode public DoublyNode() { Element = null; Flink = null; Blink = null; }