private XPathSelectionIterator(XPathSelectionIterator it) { this.nav = it.nav.Clone(); this.query = it.query.Clone(); for(position = 0; position < it.position; position ++) { this.query.advance(); } }
// sdub: Clone() inplementation of this class rely on fact that position is exectely the number of // calls to query.advance(). If you decide to overide this class be avare of that you don't breake this. private XPathSelectionIterator(XPathSelectionIterator it) { this.nav = it.nav.Clone(); this.query = it.query.Clone(); for (position = 0; position < it.position; position++) { this.query.advance(); } }