public int position() { return base.position(); }
public int position() { return base.position(); }
public int position() { return base.position(); }
public int position() { return base.position(); }
public int position() { return base.position(); }
public int position() { return base.position(); }
public int position() { return base.position(); }
/** * Get the current position. This will usually be zero before the first call * on next(), otherwise it will be the number of times that next() has * been called. Once next() has returned null, the preferred action is * for subsequent calls on position() to return -1, but not all existing * implementations follow this practice. (In particular, the EmptyIterator * is stateless, and always returns 0 as the value of position(), whether * or not next() has been called.) * <p/> * This method does not change the state of the iterator. * * @return the current position, the position of the item returned by the * most recent call of next(). This is 1 after next() has been successfully * called once, 2 after it has been called twice, and so on. If next() has * never been called, the method returns zero. If the end of the sequence * has been reached, the value returned will always be <= 0; the preferred * value is -1. * @since 8.4 */ public int position() { return base.position(); } }
/** * Get the next item if there is one */ public Item next() throws XPathException { if (nextItem == null) { current = null; position = -1; return null; } current = nextItem; position++; if (base.position() < max) { nextItem = base.next(); } else { nextItem = null; } return current; }
/** * Get the next item if there is one */ public Item next() throws XPathException { if (nextItem == null) { current = null; position = -1; return null; } current = nextItem; position++; if (base.position() < max) { nextItem = base.next(); } else { nextItem = null; } return current; }
public Item next() throws XPathException { current = base.next(); if (current != null && base.position() == removePosition) { current = base.next(); } if (current == null) { position = -1; } else { position++; } return current; }
public Item next() throws XPathException { current = base.next(); if (current != null && base.position() == removePosition) { current = base.next(); } if (current == null) { position = -1; } else { position++; } return current; }
public Item next() throws XPathException { current = base.next(); if (current != null && base.position() == removePosition) { current = base.next(); } if (current == null) { position = -1; } else { position++; } return current; }
/** * Get the next item if there is one */ public Item next() throws XPathException { if (nextItem == null) { current = null; position = -1; return null; } current = nextItem; position++; if (base.position() < max) { nextItem = base.next(); } else { nextItem = null; base.close(); } return current; }
/** * Get the next item in the sequence. This method changes the state of the * iterator, in particular it affects the result of subsequent calls of * position() and current(). * * @return the next item, or null if there are no more items. Once a call * on next() has returned null, no further calls should be made. The preferred * action for an iterator if subsequent calls on next() are made is to return * null again, and all implementations within Saxon follow this rule. * @throws net.sf.saxon.trans.XPathException * if an error occurs retrieving the next item * @since 8.4 */ public Item next() throws XPathException { int count = base.position(); Item next = base.next(); if (next == null) { closingAction.close(base, count); } return next; }
/** * Get the context position (the position of the context item) * @return the context position (starting at one) * @throws XPathException if the context position is undefined */ public final int getContextPosition() throws XPathException { if (currentIterator==null) { XPathException e = new XPathException("The context position is currently undefined"); e.setXPathContext(this); e.setErrorCode("FONC0001"); throw e; } return currentIterator.position(); }
/** * Get the context position (the position of the context item) * @return the context position (starting at one) * @throws XPathException if the context position is undefined */ public final int getContextPosition() throws XPathException { if (currentIterator==null) { XPathException e = new XPathException("The context position is currently undefined"); e.setXPathContext(this); e.setErrorCode("FONC0001"); throw e; } return currentIterator.position(); }
/** * Get the context position (the position of the context item) * @return the context position (starting at one) * @throws XPathException if the context position is undefined */ public final int getContextPosition() throws XPathException { if (currentIterator==null) { XPathException e = new XPathException("The context position is currently undefined"); e.setXPathContext(this); e.setErrorCode("FONC0001"); throw e; } return currentIterator.position(); }