RTree extends SpatialIndex<T> { @Override public boolean remove( T object ) { if ( root == null ) { LOG.error( "The tree is empty. Nothing to remove." ); return false; } TraceCell<T>[] trace = findLeafWithValue( object, root ); if ( trace != null ) { removeFromArray( trace[0].node, trace[0].index ); removedNodeEntries = new ArrayList<NodeEntry<T>>(); boolean remove = false; int nnl = notNullLength( trace[0].node ); if ( nnl < smallm ) { remove = true; for ( int j = 0; j < nnl; j++ ) { removedNodeEntries.add( trace[0].node[j] ); } } condenseTree( trace, 1, remove ); return true; } return false; } RTree( float[] rootEnvelope, int numberOfObjects ); static RTree<T> loadFromDisk( String storagePath ); @Override LinkedList<T> query( float[] env ); @SuppressWarnings("unchecked") @Override void insertBulk( List<Pair<float[], T>> listOfObjects ); @Override void clear(); @Override boolean remove( T object ); boolean getExtraFlag(); @SuppressWarnings("unchecked") @Override boolean insert( float[] insertBox, T object ); void writeTreeToDisk( String storagePath );  }
@Test public void testRemove() { tree.remove( new Long( 11 ) ); printOut( tree ); }