public OMVRBTreeEntryPersistent < K , V > delete ( ) throws IOException { if ( dataProvider != null ) { pTree . removeNodeFromMemory ( this ) ; pTree . removeEntry ( dataProvider . getIdentity ( ) ) ; // EARLY LOAD LEFT AND DELETE IT RECURSIVELY if ( getLeft ( ) != null ) ( ( OMVRBTreeEntryPersistent < K , V > ) getLeft ( ) ) . delete ( ) ; // EARLY LOAD RIGHT AND DELETE IT RECURSIVELY if ( getRight ( ) != null ) ( ( OMVRBTreeEntryPersistent < K , V > ) getRight ( ) ) . delete ( ) ; // DELETE MYSELF dataProvider . removeIdentityChangedListener ( this ) ; dataProvider . delete ( ) ; clear ( ) ; } return this ; }
Delete all the nodes recursively . IF they are not loaded in memory load all the tree .