My application has a methodA that is executed for a service request. Now we would like to send a list of requests instead of single request and for every request methodA has to be called or processed. I could put a basic loop and call the method like
public String findN(criteria criteriaList) {
.....................
for( int i = 0; i < reqList.length; i++ )
{
Req req = reqList[i];
methodA(req);
}
}
Is there a better programming approach then just looping? Is there a design pattern that covers this aspect?