@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; } // the object to-be-removed was not found return false; }
condenseTree( trace, traceIndex + 1, true ); condenseTree( trace, traceIndex + 1, false ); condenseTree( trace, traceIndex + 1, false );