@Test public void testGetCount() { PointQuadTree<String> qt = getTree(); assertEquals("Count should be 5", 6, qt.getCount()); qt.remove(new Vector3(50, 32)); assertEquals("Count should be 4", 5, qt.getCount()); }
@Override public V remove(Vector3 k) { Node<V> node = this.find(this.root, k); if (node != null) { V value = node.getData().getValue(); node.setData(null); node.setNodeType(NodeType.EMPTY); this.balance(node); this.count--; return value; } else { return null; } }
PointQuadTree extends QuadTree<Vector3, V> { @Override public V remove(Vector3 k) { Node<V> node = this.find(this.root, k); if (node != null) { V value = node.getData().getValue(); node.setData(null); node.setNodeType(NodeType.EMPTY); this.balance(node); this.count--; return value; } else { return null; } } }
PointQuadTree extends QuadTree<Vector3, V> { @Override public V remove(Vector3 k) { Node<V> node = this.find(this.root, k); if (node != null) { V value = node.getData().getValue(); node.setData(null); node.setNodeType(NodeType.EMPTY); this.balance(node); this.count--; return value; } else { return null; } } PointQuadTree(float minX, float minZ, float maxX, float maxZ);  PointQuadTree(Vector3 startPoint,Vector3 endPoint); }
PointQuadTree extends QuadTree<Vector3, V> { @Override public V remove(Vector3 k) { Node<V> node = this.find(this.root, k); if (node != null) { V value = node.getData().getValue(); node.setData(null); node.setNodeType(NodeType.EMPTY); this.balance(node); this.count--; return value; } else { return null; } } 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(); }
PointQuadTree extends QuadTree<Vector3, V> { @Override public V remove(Vector3 k) { Node<V> node = this.find(this.root, k); if (node != null) { V value = node.getData().getValue(); node.setData(null); node.setNodeType(NodeType.EMPTY); this.balance(node); this.count--; return value; } else { return null; } } 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();  }