so that it references the node before and after it. This way a node can be removed without having to scan the list to find it. This class does not provide an Iterator implementation as its designed for efficiency and not genericity. There are a number of ways to iterate the list. Simple iterator:
for ( LinkedListNode node = list.getFirst(); node != null; node = node.getNext() ) { }
Iterator that pops the first entry: for ( LinkedListNode node = list.removeFirst(); node != null; node = list.removeFirst() ) { }
@author Mark Proctor
@author Bob McWhirter
|
|