A method signature is part of the method declaration. It is the combination of the method name and the parameter list.
So instead of specifying a list of parameters, I just want to pass a request object which constitute all the parameters. It might not be true for all the methods, but want to try wherever it is possible.
Say for example
public void setMapReference(int xCoordinate, int yCoordinate)
{
//method code
}
can also be written as
public void setMapReference(Point point)
{
//method code
}
class Point {
int xCoordinate;
int yCoordinate;
boolean isValidPoint();
}
But the caller may confuse as he is not aware of the parameters..!!
Is it a good practice???