1 16 19 20 package com.sun.org.apache.xalan.internal.xsltc.dom; 21 22 import com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary; 23 import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator; 24 import com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase; 25 26 61 public final class ForwardPositionIterator extends DTMAxisIteratorBase { 62 63 private DTMAxisIterator _source; 64 65 public ForwardPositionIterator(DTMAxisIterator source) { 66 _source = source; 67 } 68 69 public DTMAxisIterator cloneIterator() { 70 try { 71 final ForwardPositionIterator clone = 72 (ForwardPositionIterator) super.clone(); 73 clone._source = _source.cloneIterator(); 74 clone._isRestartable = false; 75 return clone.reset(); 76 } 77 catch (CloneNotSupportedException e) { 78 BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, 79 e.toString()); 80 return null; 81 } 82 } 83 84 public int next() { 85 return returnNode(_source.next()); 86 } 87 88 public DTMAxisIterator setStartNode(int node) { 89 _source.setStartNode(node); 90 return this; 91 } 92 93 public DTMAxisIterator reset() { 94 _source.reset(); 95 return resetPosition(); 96 } 97 98 public void setMark() { 99 _source.setMark(); 100 } 101 102 public void gotoMark() { 103 _source.gotoMark(); 104 } 105 } 106 | Popular Tags |