/** * Get the length of the list. * * @return The size of this node set. */ public int size() { return super.size(); }
/** * Get the length of the list. * * @return The size of this node set. */ public int size() { return super.size(); }
/** * Append the nodes to the list. * * @param nodes NodeVector to append to this list */ public void appendNodes(NodeVector nodes) { int nNodes = nodes.size(); if (null == m_map) { m_mapSize = nNodes + m_blocksize; m_map = new int[m_mapSize]; } else if ((m_firstFree + nNodes) >= m_mapSize) { m_mapSize += (nNodes + m_blocksize); int newMap[] = new int[m_mapSize]; System.arraycopy(m_map, 0, newMap, 0, m_firstFree + nNodes); m_map = newMap; } System.arraycopy(nodes.m_map, 0, m_map, m_firstFree, nNodes); m_firstFree += nNodes; }
/** * Append the nodes to the list. * * @param nodes NodeVector to append to this list */ public void appendNodes(NodeVector nodes) { int nNodes = nodes.size(); if (null == m_map) { m_mapSize = nNodes + m_blocksize; m_map = new int[m_mapSize]; } else if ((m_firstFree + nNodes) >= m_mapSize) { m_mapSize += (nNodes + m_blocksize); int newMap[] = new int[m_mapSize]; System.arraycopy(m_map, 0, newMap, 0, m_firstFree + nNodes); m_map = newMap; } System.arraycopy(nodes.m_map, 0, m_map, m_firstFree, nNodes); m_firstFree += nNodes; }
/** * Resets the iterator to the last start node. * * @return A DTMAxisIterator, which may or may not be the same as this * iterator. */ public DTMAxisIterator reset() { m_ancestorsPos = m_ancestors.size()-1; _currentNode = (m_ancestorsPos>=0) ? m_ancestors.elementAt(m_ancestorsPos) : DTM.NULL; return resetPosition(); }
/** * Resets the iterator to the last start node. * * @return A DTMAxisIterator, which may or may not be the same as this * iterator. */ public DTMAxisIterator reset() { m_ancestorsPos = m_ancestors.size()-1; _currentNode = (m_ancestorsPos>=0) ? m_ancestors.elementAt(m_ancestorsPos) : DTM.NULL; return resetPosition(); }
/** * @see DTMIterator#getCurrentNode() */ public int getCurrentNode() { if(hasCache()) { int currentIndex = m_next-1; NodeVector vec = getVector(); if((currentIndex >= 0) && (currentIndex < vec.size())) return vec.elementAt(currentIndex); else return DTM.NULL; } if(null != m_iter) { return m_iter.getCurrentNode(); } else return DTM.NULL; }
/** * @see DTMIterator#getCurrentNode() */ public int getCurrentNode() { if(hasCache()) { int currentIndex = m_next-1; NodeVector vec = getVector(); if((currentIndex >= 0) && (currentIndex < vec.size())) return vec.elementAt(currentIndex); else return DTM.NULL; } if(null != m_iter) { return m_iter.getCurrentNode(); } else return DTM.NULL; }
m_last = vec.size();
m_last = vec.size();
return nv.size();
return nv.size();
getMatchingAncestors(xctxt, sourceNode, Constants.NUMBERLEVEL_SINGLE == m_level); int lastIndex = ancestors.size() - 1;
else if(hasCache() && m_next < getVector().size())
else if(hasCache() && m_next < getVector().size())
int size = vec.size(), i;
int size = vec.size(), i;
node = makeNodeHandle(nodeID); m_ancestorsPos = m_ancestors.size()-1;
node = makeNodeHandle(nodeID); m_ancestorsPos = m_ancestors.size()-1;
m_ancestorsPos = m_ancestors.size()-1;