code: public QuadTreeIterator getIterator(Geometry query, double tolerance, boolean bSorted) {
  		if (!bSorted) {
  			QuadTreeImpl.QuadTreeIteratorImpl iterator = m_impl.getIterator(query, tolerance);
  			return new QuadTreeIterator(iterator, false);
  		} else {
  			QuadTreeImpl.QuadTreeSortedIteratorImpl iterator = m_impl.getSortedIterator(query, tolerance);
  			return new QuadTreeIterator(iterator, true);
  		}
  	}
docs: Gets an iterator on the QuadTree. The query will be the Envelope2D that bounds the input Geometry.
  To reuse the existing iterator on the same QuadTree but with a new query, use the reset_iterator function on the QuadTree_iterator.
  \param query The Geometry used for the query. If the Geometry is a Line segment, then the query will be the segment. Otherwise the query will be the Envelope2D bounding the Geometry.
  \param tolerance The tolerance used for the intersection tests.
  \param bSorted Put true to iterate the quad tree in the order of the Element_types.