private boolean setNextIterator ( ) { boolean retval = false ; // first, check if the activeIterator is null, and set it. if ( m_activeIterator == null ) { if ( m_rsIterators . size ( ) > 0 ) { m_activeIteratorIndex = 0 ; m_currentCursorPosition = 0 ; m_activeIterator = ( OJBIterator ) m_rsIterators . get ( m_activeIteratorIndex ) ; } } else if ( ! m_activeIterator . hasNext ( ) ) { if ( m_rsIterators . size ( ) > ( m_activeIteratorIndex + 1 ) ) { // we still have iterators in the collection, move to the // next one, increment the counter, and set the active // iterator. m_activeIteratorIndex ++ ; m_currentCursorPosition = 0 ; m_activeIterator = ( OJBIterator ) m_rsIterators . get ( m_activeIteratorIndex ) ; retval = true ; } } return retval ; }
Convenience routine to move to the next iterator if needed .