PointQuadTree extends QuadTree<Vector3, V> { public PointQuadTree<V> clone() { float x1 = this.root.getX(); float y1 = this.root.getZ(); float x2 = x1 + this.root.getW(); float y2 = y1 + this.root.getH(); final PointQuadTree<V> clone = new PointQuadTree<V>(x1, y1, x2, y2); this.traverse(this.root, new Func<V>() { @Override public void call(PointQuadTree<V> quadTree, Node<V> node) { PointData<V> data=(PointData<V>) node.getData(); clone.set(data.getPoint().copy(), data.getValue()); } }); return clone; } PointQuadTree(float minX, float minZ, float maxX, float maxZ);  PointQuadTree(Vector3 startPoint,Vector3 endPoint); @SuppressWarnings({ "unchecked", "rawtypes" }) @Override void set(Vector3 k, V v); @Override V get(Vector3 k, V defaultValue); @Override Node<V> find(Node<V> node, Vector3 vector3); @Override V remove(Vector3 k); @SuppressWarnings("unchecked") @Override List<PointData<V>> getKeyValues(); @Override List<Vector3> getKeys(); @Override List<V> getValues(); void traverse(Node<V> node, Func<V> func); List<PointData<V>> searchIntersect(final double xmin, final double ymin, final double xmax,
			final double ymax); List<PointData<V>> searchWithin(final float xmin, final float zmin, final float xmax, final float zmax); List<PointData<V>> searchWithin(Vector3 point, float radius); PointQuadTree<V> clone();  }
@Test public void testClone() { PointQuadTree<String> qt = getTree().clone(); assertFalse("Clone should not be empty", qt.isEmpty()); assertTrue("Should contain (47, 96)", qt.contains(new Vector3(47, 96))); }