Witam, mam napisać metodę która zwróci mi poprzednik w drzewie BST

napisałem tyle niestety nie działa mi jak trzeba.

 /*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package drzewabst;

/**
 *
 * @author Patryk
 */
public class Lab8 extends BinaryTreeNode{    
    
    public Lab8(int dane) {
        super(dane);
   
    }

    @Override
    public void print(int poziom) {
       if(lewy != null)lewy.print(poziom+1);        
          for(int n =0; n<poziom; n++)System.out.print(" ");{
            System.out.println(dane);
            if(prawy != null)prawy.print(poziom+1);
        }
          
    }

     public boolean searchBSTRec(int szukany) {
       if(dane == szukany) return true;
       if(szukany < dane){
           if(this.lewy != null) return lewy.searchBSTRec(szukany);
       }
       if(szukany > dane){
          if(this.prawy != null) return prawy.searchBSTRec(szukany);
       }
        return false;
     }

    @Override
    public void addBSTRec(int nowy) {
       if(dane > nowy){
           if(this.lewy == null) this.lewy = new Lab8(nowy);
           else this.lewy.addBSTRec(nowy);
       }else{
           if(this.prawy == null) this.prawy = new Lab8(nowy);
           else this.prawy.addBSTRec(nowy);
       }
      
       
     
     }
// ta metoda mi nie działa 
    @Override
    public Pair<BinaryTreeNode, BinaryTreeNode> searchBST(int szukany) 
    {
        int current = 0;
        while(szukany != dane && this.lewy != null && this.prawy != null){
            if(szukany < dane){
                current = this.lewy.dane;
            }
            if(szukany > dane){
                current = this.prawy.dane;
            }
        }
       Pair p = new Pair(szukany,current);
       return p;
    }


    
    
}