public void insertLast(Vakje vakje) { Link newLink = new Link(vakje); if (isEmpty()) { first = newLink; } else { last.next = newLink; newLink.previous = last; } last = newLink; }
public void insertFirst(Vakje vakje) { Link newLink = new Link(vakje); if (isEmpty()) { last = newLink; } else { first.previous = newLink; } newLink.next = first; first = newLink; }
public LinkedList() { first = null; last = null; }
public LinkedList() { first = null; last = null; lengte = 0; }