public int countLinks ( ) { int count = 0 ; Link look = _dummyHead . getNextLogicalLink ( ) ; while ( look != null && _dummyTail != look ) { count ++ ; look = look . _getNextLink ( ) ; } return count ; }
This is a method used by the unit tests to determine the number of links in the list . It s too inefficient for any other purpose .