I am new to Java, so please be patient.
Usually to convert (convert) lists to lists. Some languages ββhave a method map, some (C #) Select. How is this done with Java? Is a loop the foronly option?
I expect I can do something like this:
List<Customer> customers = new ArrayList<Customer>();
...
List<CustomerDto> dtos = customers.convert(new Converter(){
public convert(c) {
return new CustomerDto();
}
})
Did I miss something? Please give me a starting point.
source
share