(back to list, I think Emmanuel sent it by accident to me)
On Mon, Feb 14, 2011 at 3:56 PM, Emmanuel Lécharny <[email protected]> wrote:
> Ok, after some cleanup, I come with two sets of restricted constructors :
>
> Empty Dn constructors :
> - Dn()
> - Dn( SchemaManager)
>
> Constructors having a DN (as a string) :
> - Dn(String)
> - Dn(SchemaManager, String)
>
> Constructors having RDNs (as strings) :
> Dn(String...)
> Dn(SchemaManager, String...)
I don't understand what's the difference between those two groups if one codes
new Dn("abc")
How does the runtime distinguish the two constructors. I have to read
the spec again...
> Cnstructors having a set of RDNs :
> - Dn(Rdn)
> - Dn(SchemaManager, Rdn)
I guess you mean "Rdn..."
> The other constructors are most certainly spurious at this point :
>
> Dn(Rdn child, Dn parent)
>
> can be replaced by :
>
> parent.add( child );
>
> as the Dn is an immutable class.
>
> Is it ok for all of you ?
I find it a bit inconvenient. If I see that a class has an "add()"
method I expect that when using that method that the object is
modified. I think I'd prefer to get rid of all the "add", "addAll" and
"remove" methods that pretend mutability.
Kind Regards,
Stefan