public void transfer ( LinkedList transferFrom ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "transfer" , new Object [ ] { transferFrom } ) ; //synchronize on the other list so that we can call the internal, //unsynchronized methods and access the entries in the list directly synchronized ( transferFrom ) { //iterate over all of the entries in the list, removing them and //adding them in to this list at the bottom. Entry entry = transferFrom . first ; while ( entry != null ) { insertAtBottom ( entry . forceRemove ( ) ) ; entry = transferFrom . first ; } } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "transfer" ) ; }
Synchronized . Transfer all of the entries in a given list in to this one . This is the same as removing each one from the given list and inserting it in to this list at the bottom .