directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <>
Subject Re: Dn should probably not implement Comparable
Date Tue, 15 Feb 2011 22:25:35 GMT
On Tue, Feb 15, 2011 at 11:07 PM, Stefan Seelmann <>wrote:

> I agree that it's not very useful.
> I can imagine that it was required when we had the updn and ndn index
> because the underlying B+Tree requires an ordered key.
Right this is a remnant of that era when the Dn did need the compareTo
functionality. Now it's not needed because of the new rdn index replacing
these two indices.

> But please note that Rdn still needs to implement Comparable because
> they are used as part of the key in the RDN index.
And so the old need  is fulfilled by the Rdn class.

> On Tue, Feb 15, 2011 at 4:23 PM, Emmanuel Lecharny <>
> wrote:
> > Hi,
> >
> > the compareTo method has a semantic that probably does not applies to the
> Dn
> > class : either two DNs are equals, or they are different, but they aren't
> > superior or inferior, except if one is the parent of the other.
> >
> > As we already have a isParent and isChild methods, I suggest we remove
> the
> > compareTo() methods (which is never used) and not implemen the
> > Comparable<Dn> interface.
> >
> > Thoughts ?

In theory this sounds perfect. Why don't we try to remove it in practice and
see if we no longer need it. If so then we're good.

I agree that it makes no sense anymore.


View raw message