I have the List of SourceObjects and I need to convert it to the List of ResultObjects.
I can fetch one object to another using method of ResultObject:
convertFromSource(srcObj);
of course I can do it like this:
public void onNext(List<SourceObject> srcObjects) {
List<ResultsObject> resObjects = new ArrayList<>();
for (SourceObject srcObj : srcObjects) {
resObjects.add(new ResultsObject().convertFromSource(srcObj));
}
}
but I will be very appreciate to someone who can show how to do the same using rxJava.