OneStepIteratorForwardpublic class OneStepIteratorForward extends ChildTestIterator This class implements a general iterator for
those LocationSteps with only one step, and perhaps a predicate,
that only go forward (i.e. it can not be used with ancestors,
preceding, etc.) |
Fields Summary |
---|
protected int | m_axisThe traversal axis from where the nodes will be filtered. |
Constructors Summary |
---|
OneStepIteratorForward(Compiler compiler, int opPos, int analysis)Create a OneStepIterator object.
super(compiler, opPos, analysis);
int firstStepPos = compiler.getFirstChildPos(opPos);
m_axis = WalkerFactory.getAxisFromStep(compiler, firstStepPos);
| public OneStepIteratorForward(int axis)Create a OneStepIterator object that will just traverse the self axes.
super(null);
m_axis = axis;
int whatToShow = DTMFilter.SHOW_ALL;
initNodeTest(whatToShow);
|
Methods Summary |
---|
public boolean | deepEquals(com.sun.org.apache.xpath.internal.Expression expr)
if(!super.deepEquals(expr))
return false;
if(m_axis != ((OneStepIteratorForward)expr).m_axis)
return false;
return true;
| public int | getAxis()Returns the axis being iterated, if it is known.
return m_axis;
| protected int | getNextNode()Get the next node via getFirstAttribute && getNextAttribute.
m_lastFetched = (DTM.NULL == m_lastFetched)
? m_traverser.first(m_context)
: m_traverser.next(m_context, m_lastFetched);
return m_lastFetched;
| public void | setRoot(int context, java.lang.Object environment)Initialize the context values for this expression
after it is cloned.
super.setRoot(context, environment);
m_traverser = m_cdtm.getAxisTraverser(m_axis);
|
|