public int compareTo(Personne p){
        
        int ret = 0;
        boolean fini = false;
        int taille = 0;
        int i = 0;
        String p1 = "";
        String p2 = "";

        if (!this.getNom().equals(p.getNom()))
        {
            p1 = this.getNom();
            p2 = p.getNom();  
        }
        else 
        {

            if (!this.getPrenom().equals(p.getPrenom()))
            {
                p1 = this.getPrenom();
                p2 = p.getPrenom();
            }
            else 
            {
                fini = true;
            }
        }
       
        if (p1.length() > p2.length()) {taille = p2.length();}
        else {taille = p1.length();}

	    while (!fini && i<taille)
	    {
	        ret = ((Character)p1.charAt(i)).compareTo((Character)p2.charAt(i));
	        if (ret == 0) i++;
	        else fini = true;
	    }
	    return ret;
	}