private int sequentialFindDelete ( int lower , int upper , Object delKey ) { java . util . Comparator comp = deleteComparator ( ) ; int xcc ; /* Current compare result */ int idx = - 1 ; /* The returned index (-1 if not found) */ for ( int i = lower ; i <= upper ; i ++ ) { xcc = comp . compare ( delKey , _nodeKey [ i ] ) ; if ( xcc == 0 ) /* Found a match */ { idx = i ; /* Remember current point */ break ; } } return idx ; }
Use sequential search to find the delete key .