Default method parameter values
I really, really think that they should incorporate default method parameter values in the next major release.
It is time-consuming, obstructing and confusing to have methods with 1...n parameters.
I.e.
publicvoid doStuff(int id)
{
doStuff(id,"",false,Collections.EMPTY_LIST,new Date());
}
publicvoid doStuff(int id, String name)
{
doStuff(id,name,false,Collections.EMPTY_LIST,new Date());
}
publicvoid doStuff(int id, String name,boolean sort)
{
doStuff(id,name,sort,Collections.EMPTY_LIST,new Date());
}
publicvoid doStuff(int id, String name,boolean sort, List values)
{
doStuff(id,name,sort,values,new Date());
}
publicvoid doStuff(int id, String name,boolean sort, List values, Date date)
{
doStuff(id,name,sort,values, date);
}
Not to mention the amount of JavaDoc-tags it requires.
Wouldn't it just be simpler, more understandable and easier to have it as:
publicvoid doStuff(int id, String name :"",boolean sort : false, List values : Collections.EMPTY_LIST, Date date :new Date())
{
//Do the stuff here
}
Suggestions?

