[Solved] Returning from a function once an async operation is done [duplicate]


Personally, RxJava is overkill. All you need is to pass in the continuation function as a parameter

class Validator {
    void validate(DataListener dl){
        DataProvider.getInstance(dl);
    }

And now, wherever you call this method, put in your new DataListener. Don’t assign a result of validate() to a variable

solved Returning from a function once an async operation is done [duplicate]