public void runTo ( int index ) { if ( ! m_cacheNodes ) throw new RuntimeException ( XSLMessages . createXPATHMessage ( XPATHErrorResources . ER_NODESET_CANNOT_INDEX , null ) ) ; //"This NodeSet can not do indexing or counting functions!"); if ( ( index >= 0 ) && ( m_next < m_firstFree ) ) m_next = index ; else m_next = m_firstFree - 1 ; }
If an index is requested NodeSet will call this method to run the iterator to the index . By default this sets m_next to the index . If the index argument is - 1 this signals that the iterator should be run to the end .