Sometimes settings are given as Properties.
Having to read, decode and pass individual parameters to the any Settings class is too much work.
My request is to add a function for each Settings class that has a single Properties parameters and get
the required Settings parameters from that single Properties parameter and if any required parameter
is missing or invalid, throws an IllegalArgumentException
why the create prefix? to make it more obvious that this is a convenience function and not a constructor.
Thus, implies that providing properties alone does not satisfies all the requirements of creating an instance
of the class but extra implicit steps will be done to actually create the class.
Sometimes settings are given as
Properties
. Having to read, decode and pass individual parameters to the any Settings class is too much work.My request is to add a function for each Settings class that has a single
Properties
parameters and get the required Settings parameters from that singleProperties
parameter and if any required parameter is missing or invalid, throws anIllegalArgumentException
Here is the functions I'm proposing: