I have a series of IF statements in order of execution, my dilemma is if one of the IF statements is entered I would like the calling method to wait till the called function is finished. The thing is my called function is recursive so I have no idea when it's going to end. Here's the calling method's code.
if(log.isChecked())
{
runlog(sdPath.getAbsolutePath());
}
if(tmp.isChecked())
{
runtmp(sdPath.getAbsolutePath());
}
if(txt.isChecked())
{
runtxt(sdPath.getAbsolutePath());
}
if(bf.isChecked())
{
runbf(sdPath.getAbsolutePath());
}
if(ed.isChecked())
{
runed(sdPath.getAbsolutePath());
}
If log.isChecked() is entered, I would like the calling function(the code I've shown here, that function) to wait till it checks the next condition which is tmp.isChecked()
As I mentioned before ALL the called functions runlog, runtmp, runtxt, runbf, runed are recursive. How do I achieve what I want?