/** * Get a clone of this iterator, but don't reset the iteration in the * process, so that it may be used from the current position. * Note: Not a deep clone. * * @return A clone of this object. * * @throws CloneNotSupportedException */ public Object clone() throws CloneNotSupportedException { NodeSequence clone = (NodeSequence) super.clone(); if (null != m_iter) clone.m_iter = (DTMIterator) m_iter.clone(); if (m_cache != null) { // In making this clone of an iterator we are making // another NodeSequence object it has a reference // to the same IteratorCache object as the original // so we need to remember that more than one // NodeSequence object shares the cache. m_cache.increaseUseCount(); } return clone; }
/** * Get a clone of this iterator, but don't reset the iteration in the * process, so that it may be used from the current position. * Note: Not a deep clone. * * @return A clone of this object. * * @throws CloneNotSupportedException */ public Object clone() throws CloneNotSupportedException { NodeSequence clone = (NodeSequence) super.clone(); if (null != m_iter) clone.m_iter = (DTMIterator) m_iter.clone(); if (m_cache != null) { // In making this clone of an iterator we are making // another NodeSequence object it has a reference // to the same IteratorCache object as the original // so we need to remember that more than one // NodeSequence object shares the cache. m_cache.increaseUseCount(); } return clone; }
/** * Get an instance of the given object in this pool * * @return An instance of the given object */ public synchronized DTMIterator getInstanceOrThrow() throws CloneNotSupportedException { // Check if the pool is empty. if (m_freeStack.isEmpty()) { // Create a new object if so. return (DTMIterator)m_orig.clone(); } else { // Remove object from end of free pool. DTMIterator result = (DTMIterator)m_freeStack.remove(m_freeStack.size() - 1); return result; } }
/** * Get an instance of the given object in this pool * * @return An instance of the given object */ public synchronized DTMIterator getInstanceOrThrow() throws CloneNotSupportedException { // Check if the pool is empty. if (m_freeStack.isEmpty()) { // Create a new object if so. return (DTMIterator)m_orig.clone(); } else { // Remove object from end of free pool. DTMIterator result = (DTMIterator)m_freeStack.remove(m_freeStack.size() - 1); return result; } }
/** Public constructor: Wrap a DTMNodeIterator around an existing * and preconfigured DTMIterator * */ public DTMNodeIterator(DTMIterator dtmIterator) { try { dtm_iter=(DTMIterator)dtmIterator.clone(); } catch(CloneNotSupportedException cnse) { throw new org.apache.xml.utils.WrappedRuntimeException(cnse); } }
/** Public constructor: Wrap a DTMNodeIterator around an existing * and preconfigured DTMIterator * */ public DTMNodeIterator(DTMIterator dtmIterator) { try { dtm_iter=(DTMIterator)dtmIterator.clone(); } catch(CloneNotSupportedException cnse) { throw new org.apache.xml.utils.WrappedRuntimeException(cnse); } }
/** * Get a cloned LocPathIterator that holds the same * position as this iterator. * * @return A clone of this iterator that holds the same node position. * * @throws CloneNotSupportedException */ public Object clone() throws CloneNotSupportedException { UnionPathIterator clone = (UnionPathIterator) super.clone(); if (m_iterators != null) { int n = m_iterators.length; clone.m_iterators = new DTMIterator[n]; for (int i = 0; i < n; i++) { clone.m_iterators[i] = (DTMIterator)m_iterators[i].clone(); } } return clone; }
/** * Get a cloned LocPathIterator that holds the same * position as this iterator. * * @return A clone of this iterator that holds the same node position. * * @throws CloneNotSupportedException */ public Object clone() throws CloneNotSupportedException { UnionPathIterator clone = (UnionPathIterator) super.clone(); if (m_iterators != null) { int n = m_iterators.length; clone.m_iterators = new DTMIterator[n]; for (int i = 0; i < n; i++) { clone.m_iterators[i] = (DTMIterator)m_iterators[i].clone(); } } return clone; }
/** * Get an instance of the given object in this pool * * @return An instance of the given object */ public synchronized DTMIterator getInstance() { // Check if the pool is empty. if (m_freeStack.isEmpty()) { // Create a new object if so. try { return (DTMIterator)m_orig.clone(); } catch (Exception ex) { throw new WrappedRuntimeException(ex); } } else { // Remove object from end of free pool. DTMIterator result = (DTMIterator)m_freeStack.remove(m_freeStack.size() - 1); return result; } }
/** * Get an instance of the given object in this pool * * @return An instance of the given object */ public synchronized DTMIterator getInstance() { // Check if the pool is empty. if (m_freeStack.isEmpty()) { // Create a new object if so. try { return (DTMIterator)m_orig.clone(); } catch (Exception ex) { throw new WrappedRuntimeException(ex); } } else { // Remove object from end of free pool. DTMIterator result = (DTMIterator)m_freeStack.remove(m_freeStack.size() - 1); return result; } }
(DTMIterator) xpc.getContextNodeList().clone();
xpc.pushContextNodeList((DTMIterator) m_contextNodeList.clone());
/** Public constructor: Wrap a DTMNodeIterator around an existing * and preconfigured DTMIterator * */ public DTMNodeIterator(DTMIterator dtmIterator) { try { dtm_iter=(DTMIterator)dtmIterator.clone(); } catch(CloneNotSupportedException cnse) { throw new org.apache.xml.utils.WrappedRuntimeException(cnse); } }
/** Public constructor: Wrap a DTMNodeIterator around an existing * and preconfigured DTMIterator * */ public DTMNodeIterator(DTMIterator dtmIterator) { try { dtm_iter=(DTMIterator)dtmIterator.clone(); } catch(CloneNotSupportedException cnse) { throw new org.apache.xml.utils.WrappedRuntimeException(cnse); } }
/** Public constructor: Wrap a DTMNodeIterator around an existing * and preconfigured DTMIterator * */ public DTMNodeIterator(DTMIterator dtmIterator) { try { dtm_iter=(DTMIterator)dtmIterator.clone(); } catch(CloneNotSupportedException cnse) { throw new org.apache.xml.utils.WrappedRuntimeException(cnse); } }
/** Public constructor: Wrap a DTMNodeIterator around an existing * and preconfigured DTMIterator * */ public DTMNodeIterator(DTMIterator dtmIterator) { try { dtm_iter=(DTMIterator)dtmIterator.clone(); } catch(CloneNotSupportedException cnse) { throw new org.apache.xml.utils.WrappedRuntimeException(cnse); } }
/** Public constructor: Wrap a DTMNodeIterator around an existing * and preconfigured DTMIterator * */ public DTMNodeIterator(DTMIterator dtmIterator) { try { dtm_iter=(DTMIterator)dtmIterator.clone(); } catch(CloneNotSupportedException cnse) { throw new org.apache.xml.utils.WrappedRuntimeException(cnse); } }
/** Public constructor: Wrap a DTMNodeIterator around an existing * and preconfigured DTMIterator * */ public DTMNodeIterator(DTMIterator dtmIterator) { try { dtm_iter=(DTMIterator)dtmIterator.clone(); } catch(CloneNotSupportedException cnse) { throw new org.apache.xml.utils.WrappedRuntimeException(cnse); } }
/** Public constructor: Wrap a DTMNodeIterator around an existing * and preconfigured DTMIterator * */ public DTMNodeIterator(DTMIterator dtmIterator) { try { dtm_iter=(DTMIterator)dtmIterator.clone(); } catch(CloneNotSupportedException cnse) { throw new org.apache.xml.utils.WrappedRuntimeException(cnse); } }
/** Public constructor: Wrap a DTMNodeIterator around an existing * and preconfigured DTMIterator * */ public DTMNodeIterator(DTMIterator dtmIterator) { try { dtm_iter=(DTMIterator)dtmIterator.clone(); } catch(CloneNotSupportedException cnse) { throw new org.apache.xml.utils.WrappedRuntimeException(cnse); } }