public Node Copy() { Node copyNode = new Node(this.data); copyNode.next = this.next; copyNode.previous = this.previous; return copyNode; }
public void AddToEnd(Employee data) { if (next == null) { next = new Node(data); next.previous = this; } else { next.AddToEnd(data); } }
public void AddSortedByID(Employee data) { if (next == null) { next = new Node(data); } else if (data.employeeID < next.data.employeeID) { Node temp = new Node(data); temp.next = this.next; temp.previous = this; this.next.previous = temp; this.next = temp; } else { next.AddSortedByID(data); } }
public Node(Employee data) { this.data = data; this.next = null; this.previous = null; }