I need help / advice for a problem..I created a service and in this I need to run an action when two integers or two strings are equals..what is the best way?
I tried with a timer:
timer.schedule(new mainTask(), mydate.equals(date));
private class mainTask extends TimerTask
{
public void run()
{
}
}
but that does not accept boolean in the when parameter..
What can I use to get what i want?
ps: my parameters are taken from a database
Thanks in advance!
Not sure exactly what you mean but if the deamon should be dependant on the strings and integers why don’t you just define a method like this:
and use this as your parameter ?
However, if you want to
schedulethe timer only if this condition applies then you have to write something like:ps the second parameter to Timer is not a condition but the DeamonFlag!