Hi, I will remove the methods there is a varargs variant of it.

Oliver


Am 20.03.15 um 19:17 schrieb Oliver B. Fischer:
I can see your point. But the optimizations you mentioned apply to the configuration and not to the builder. The builder is only intended to build a configuration. This can happen ones or multiple time in an application but not hundert times. Actually I would like to give the user the freedom to decide what to do.

So, let me summe it up: Optimizations apply only to the build configuration but not to the builder. The user must and should have the abillity to build a configuration as often as he wants.

Oliver

Am 19.03.15 um 15:18 schrieb Werner Keil:
Just a question of preference, some (or several) projects tend to hide the
constructor, others accept it and yet other ones offer even both ways;-D

Configuration conf = new ConfigurationBuilder().build();
int bar1 = conf.getInteger("foo.bar");

 From my earlier example for simplicity would be equally fine.

One has to add, the static factory allows optimization especially for a
default case to cache something if it won't change for the lifetime of an
app/VM.
If you call new ConfigurationBuilder() you always need to instantiate a new
object, only the underlying JDK may help you save resources if it can.

Werner






On Thu, Mar 19, 2015 at 3:06 PM, Oliver B. Fischer <[email protected]


--
N Oliver B. Fischer
A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany
P +49 30 44793251
M +49 178 7903538
E [email protected]
S oliver.b.fischer
J [email protected]
X http://xing.to/obf

Reply via email to