protected void addNode ( Node nodeToInsert , Node insertBeforeNode ) { // Insert node. nodeToInsert . next = insertBeforeNode ; nodeToInsert . previous = insertBeforeNode . previous ; insertBeforeNode . previous . next = nodeToInsert ; insertBeforeNode . previous = nodeToInsert ; }
Inserts a new node into the list .