Due to @Brian comment on "double brace" initialization being a no no, here's another suggestion.
For the FactoryWithArgs class I would make a FactoryWithArgsMaker class that is designed to make FactoryWithArgs objects as a List.
Something like:
public static class FactoryWithArgsMaker {
public static List<FactoryWithArgs> makeNew(int start, int end) {
List<FactoryWithArgs> list = new ArrayList();
for (int i = 0; i <= end; i++) {
list.add(new FactoryWithArgs(i));
}
return list;
}
}
As long as the order of your "Factories" don't matter in your list, and with Java 8 Streams you can initialize your list in one line like this:
List<Factory> list = Stream.concat(
Arrays.asList(
new Factory0(), new Factory1(), new Factory2(),
new Factory3(), new Factory4(), new Factory5()
).stream(),
FactoryWithArgsMaker.makeNew(0, 100).stream()
).collect(Collectors.toList());
The Stream.concat() takes the contents of Arrays.asList() and the List<FactoryWithArgs>, returned from FactoryWithArgsMaker.makeNew(), and combines them into a single stream which we then convert back into a List (.collect(Collectors.toList());