/** * Return the root. * * @param context The context node of this traversal. * * @return the first node in the traversal. */ public int first(int context) { return getDocumentRoot(context); }
/** * Return the root. * * @param context The context node of this traversal. * * @return the first node in the traversal. */ public int first(int context) { return getDocumentRoot(context); }
/** * Return the root. * * @param context The context node of this traversal. * * @return the first node in the traversal. */ public int first(int context) { return getDocumentRoot(context); }
/** * Return the root. * * @param context The context node of this traversal. * * @return the first node in the traversal. */ public int first(int context) { return getDocumentRoot(context); }
/** * Return the root if it matches the expanded type ID, * else return null (nothing found) * * @param context The context node of this traversal. * @param expandedTypeID The expanded type ID that must match. * * @return the first node in the traversal. */ public int first(int context, int expandedTypeID) { int root=getDocumentRoot(context); return (getExpandedTypeID(root) == expandedTypeID) ? root : NULL; }
/** * Return the root if it matches the expanded type ID, * else return null (nothing found) * * @param context The context node of this traversal. * @param expandedTypeID The expanded type ID that must match. * * @return the first node in the traversal. */ public int first(int context, int expandedTypeID) { int root=getDocumentRoot(context); return (getExpandedTypeID(root) == expandedTypeID) ? root : NULL; }
/** * Return the root if it matches the expanded type ID. * * @param context The context node of this traversal. * @param expandedTypeID The expanded type ID that must match. * * @return the first node in the traversal. */ public int first(int context, int expandedTypeID) { return (getExpandedTypeID(getDocumentRoot(context)) == expandedTypeID) ? context : next(context, context, expandedTypeID); }
/** * Return the root if it matches the expanded type ID. * * @param context The context node of this traversal. * @param expandedTypeID The expanded type ID that must match. * * @return the first node in the traversal. */ public int first(int context, int expandedTypeID) { return (getExpandedTypeID(getDocumentRoot(context)) == expandedTypeID) ? context : next(context, context, expandedTypeID); }
/** * By the nature of the stateless traversal, the context node can not be * returned or the iteration will go into an infinate loop. So to traverse * an axis, the first function must be used to get the first node. * * <p>This method needs to be overloaded only by those axis that process * the self node. <\p> * * @param context The context node of this traversal. This is the point * of origin for the traversal -- its "root node" or starting point. * @param expandedTypeID The expanded type ID that must match. * * @return the first node in the traversal. */ public int first(int context, int expandedTypeID) { if (isIndexed(expandedTypeID)) { int identity = 0; int firstPotential = getFirstPotential(identity); return makeNodeHandle(getNextIndexed(identity, firstPotential, expandedTypeID)); } int root = getDocumentRoot(context); return next(root, root, expandedTypeID); }
/** * By the nature of the stateless traversal, the context node can not be * returned or the iteration will go into an infinate loop. So to traverse * an axis, the first function must be used to get the first node. * * <p>This method needs to be overloaded only by those axis that process * the self node. <\p> * * @param context The context node of this traversal. This is the point * of origin for the traversal -- its "root node" or starting point. * @param expandedTypeID The expanded type ID that must match. * * @return the first node in the traversal. */ public int first(int context, int expandedTypeID) { if (isIndexed(expandedTypeID)) { int identity = 0; int firstPotential = getFirstPotential(identity); return makeNodeHandle(getNextIndexed(identity, firstPotential, expandedTypeID)); } int root = getDocumentRoot(context); return next(root, root, expandedTypeID); }
/** * Return the root. * * @param context The context node of this traversal. * * @return the first node in the traversal. */ public int first(int context) { return getDocumentRoot(context); }
/** * Return the root. * * @param context The context node of this traversal. * * @return the first node in the traversal. */ public int first(int context) { return getDocumentRoot(context); }
/** * Return the root. * * @param context The context node of this traversal. * * @return the first node in the traversal. */ public int first(int context) { return getDocumentRoot(context); }
/** * Return the root. * * @param context The context node of this traversal. * * @return the first node in the traversal. */ public int first(int context) { return getDocumentRoot(context); }
/** * Return the root. * * @param context The context node of this traversal. * * @return the first node in the traversal. */ public int first(int context) { return getDocumentRoot(context); }
/** * Return the root. * * @param context The context node of this traversal. * * @return the first node in the traversal. */ public int first(int context) { return getDocumentRoot(context); }
/** * Return the root. * * @param context The context node of this traversal. * * @return the first node in the traversal. */ public int first(int context) { return getDocumentRoot(context); }
/** * Return the root. * * @param context The context node of this traversal. * * @return the first node in the traversal. */ public int first(int context) { return getDocumentRoot(context); }
/** * Return the root. * * @param context The context node of this traversal. * * @return the first node in the traversal. */ public int first(int context) { return getDocumentRoot(context); }
/** * Return the root if it matches the expanded type ID. * * @param context The context node of this traversal. * @param expandedTypeID The expanded type ID that must match. * * @return the first node in the traversal. */ public int first(int context, int expandedTypeID) { return (getExpandedTypeID(getDocumentRoot(context)) == expandedTypeID) ? context : next(context, context, expandedTypeID); }