/** * Return the node at the given position. * * @param position The position * @return The node at the given position. */ public int getNodeByPosition(int position) { if (position > 0) { final int pos = isReverse() ? getLast() - position + 1 : position; int node; while ((node = next()) != DTMAxisIterator.END) { if (pos == getPosition()) { return node; } } } return END; }
/** * Return the node at the given position. * * @param position The position * @return The node at the given position. */ public int getNodeByPosition(int position) { if (position > 0) { final int pos = isReverse() ? getLast() - position + 1 : position; int node; while ((node = next()) != DTMAxisIterator.END) { if (pos == getPosition()) { return node; } } } return END; }
/** * Returns the number of nodes in this iterator. * * @return the number of nodes */ public int getLast() { // If nodes are stored in _nodes, take advantage of the fact that // there are no duplicates. Otherwise, fall back to the base heap // implementaiton and hope it does a good job with this. return (_nodes != null) ? _nodes.cardinality() : super.getLast(); }
/** * Returns the number of nodes in this iterator. * * @return the number of nodes */ public int getLast() { // If nodes are stored in _nodes, take advantage of the fact that // there are no duplicates. Otherwise, fall back to the base heap // implementaiton and hope it does a good job with this. return (_nodes != null) ? _nodes.cardinality() : super.getLast(); }
/** * Return the node at the given position. * * @param position The position * @return The node at the given position. */ public int getNodeByPosition(int position) { if (position > 0) { final int pos = isReverse() ? getLast() - position + 1 : position; int node; while ((node = next()) != DTMAxisIterator.END) { if (pos == getPosition()) { return node; } } } return END; }
/** * Return the node at the given position. * * @param position The position * @return The node at the given position. */ public int getNodeByPosition(int position) { if (position > 0) { final int pos = isReverse() ? getLast() - position + 1 : position; int node; while ((node = next()) != DTMAxisIterator.END) { if (pos == getPosition()) { return node; } } } return END; }
/** * Return the node at the given position. * * @param position The position * @return The node at the given position. */ public int getNodeByPosition(int position) { if (position > 0) { final int pos = isReverse() ? getLast() - position + 1 : position; int node; while ((node = next()) != DTMAxisIterator.END) { if (pos == getPosition()) { return node; } } } return END; }
/** * Return the node at the given position. * * @param position The position * @return The node at the given position. */ public int getNodeByPosition(int position) { if (position > 0) { final int pos = isReverse() ? getLast() - position + 1 : position; int node; while ((node = next()) != DTMAxisIterator.END) { if (pos == getPosition()) { return node; } } } return END; }
/** * Return the node at the given position. * * @param position The position * @return The node at the given position. */ public int getNodeByPosition(int position) { if (position > 0) { final int pos = isReverse() ? getLast() - position + 1 : position; int node; while ((node = next()) != DTMAxisIterator.END) { if (pos == getPosition()) { return node; } } } return END; }
/** * Return the node at the given position. * * @param position The position * @return The node at the given position. */ public int getNodeByPosition(int position) { if (position > 0) { final int pos = isReverse() ? getLast() - position + 1 : position; int node; while ((node = next()) != DTMAxisIterator.END) { if (pos == getPosition()) { return node; } } } return END; }
/** * Return the node at the given position. * * @param position The position * @return The node at the given position. */ public int getNodeByPosition(int position) { if (position > 0) { final int pos = isReverse() ? getLast() - position + 1 : position; int node; while ((node = next()) != DTMAxisIterator.END) { if (pos == getPosition()) { return node; } } } return END; }
/** * Return the node at the given position. * * @param position The position * @return The node at the given position. */ public int getNodeByPosition(int position) { if (position > 0) { final int pos = isReverse() ? getLast() - position + 1 : position; int node; while ((node = next()) != DTMAxisIterator.END) { if (pos == getPosition()) { return node; } } } return END; }
/** * Return the node at the given position. * * @param position The position * @return The node at the given position. */ public int getNodeByPosition(int position) { if (position > 0) { final int pos = isReverse() ? getLast() - position + 1 : position; int node; while ((node = next()) != DTMAxisIterator.END) { if (pos == getPosition()) { return node; } } } return END; }