/** * sets the next node linked to this node and also updates the previous node of the next to this */ public void setNext(Node next) { this.next = next; if (next != null) next.prev = this; }
public void addChange(String graphml) { Node first = new Node(); first.val = graphml; first.setNext(current); this.current = first; }