Hi,

On Tue, Feb 19, 2013 at 3:17 PM, Alex Parvulescu
<alex.parvule...@gmail.com> wrote:
> I came across this funny looking bit in the AbstractNodeState class [0]:

Yeah, that's actually intentional... My goal for ANS was to make it as
easy as possible to write new draft NodeState implementations without
worrying about having to implement all the methods right away (at the
time we were still trying out the concept). As long as you implement a
few key methods, the ANS base class takes care of the rest, though
often in a highly inefficient manner. Once you go past initial
drafting, you'll likely end up implementing all of the methods and
thus in the end shouldn't be needing ANS anymore except for some odd
corner cases.

Thus the reason for the circular dependency in
ANS.getChildNodeNames/Entries is to make it possible to implement
NodeState either with getChildNodeNames() and getChildNode() or with
just getChildNodeEntries(), depending on which is more convenient for
the particular implementation. Dropping one of the default
implementations will force all subclasses to implement that method,
even if they'd have an easier time implementing just the other one.

BR,

Jukka Zitting

Reply via email to