Esempio n. 1
0
  /**
   * Get a cloned Iterator that is reset to the beginning of the query.
   *
   * @return A cloned NodeIterator set of the start of the query.
   * @throws CloneNotSupportedException
   */
  public DTMIterator cloneWithReset() throws CloneNotSupportedException {

    OneStepIterator clone = (OneStepIterator) super.cloneWithReset();
    clone.m_iterator = m_iterator;

    return clone;
  }
Esempio n. 2
0
  /**
   * Get a cloned iterator.
   *
   * @return A new iterator that can be used without mutating this one.
   * @throws CloneNotSupportedException
   */
  public Object clone() throws CloneNotSupportedException {
    // Do not access the location path itterator during this operation!

    OneStepIterator clone = (OneStepIterator) super.clone();

    if (m_iterator != null) {
      clone.m_iterator = m_iterator.cloneIterator();
    }
    return clone;
  }