public boolean hasPrevious ( ) { // If we are at the start of the list there are no previous elements. if ( currentIndex == startIndex ) { return false ; } // Otherwise, see if previous Element is null. If so, try to load the // previous element to make sure it exists. if ( previousElement == null ) { previousElement = getPreviousElement ( ) ; // If getting the previous element failed, return false. if ( previousElement == null ) { return false ; } } return true ; }
Returns true if there are previous elements in the iteration .