If you were worried about the order of parameters by the way, just put all of the optional ones at the back. Or you can consider a builder pattern similar to the ones in MLlib, e.g. `new GraphLab().setGatherFunc(f).setScatterFunc(g).run(graph)`. But in this case there are few enough parameters that it's probably OK to just leave them on the method.