directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel L├ęcharny <>
Subject Re: Immutable objects, what's best ?
Date Sun, 14 Mar 2010 14:08:00 GMT
On 3/14/10 2:56 PM, Ersin Er wrote:
> You might consider builder pattern with a DSL like syntax:
> Entry entry = new EntryBuilder().add("objectClass", "top").build();
> where Entry is immutable.
That means you have to use a factory to build an entry, and that this 
factory returns a mutable object. To get an immutable object out of it, 
you have to call a third method.

Isn't it a bit too complicated ? (even if we don't consider the last 
method to create a immutable object).

Emmanuel L├ęcharny

View raw message