public boolean hasNext ( ) { if ( currentIndex == endIndex ) { return false ; } // Otherwise, see if nextElement is null. If so, try to load the next // element to make sure it exists. if ( nextElement == null ) { nextElement = getNextElement ( ) ; if ( nextElement == null ) { return false ; } } return true ; }
Returns true if there are more elements in the iteration .