Pierre van Rooden wrote: > Michiel Meeuwissen wrote: > >It would perhaps be a little easier to implement (though not actually much > >I > >think). It would though horribly bloat the Node interface, with all map > >methods which already have a counterpart in Node itself > > Still, it might be better than having a separate wrapper class. > And 'Node extends Map' is not that bad.
I think there is not much wrong with a wrapper class. Since Node is an interface, that should work. Though, perhaps there are a few instance where Node is casted back to BasicNode, which would indeed not work then, but I do think that the actual problem is then that that happens in the first place, and would rather see some new methods in Node wich would make that unncessary. (e.g. I think that 'boolean isChanged()' would help). Node extends Map would be my choice too, but really there is dissapointingly little overlap there. I think I in the end had to implement every method of Map in MapNode, which is a bit surprizing considering the fact that ultimately Node is implemented with a Map :-) So, I'd say again that I think that adding the Map methods to Node will bloat it too much with duplicate methods, and make it rather ugly. While you are in a 'mmbase' regime it is totally unnecesary as well, because the Node methods are just fine. It's only when you want something else which is not aware of MMBase to do something with nodes, then you would want it as a Map, for which I figured this wrapper would be ideal. Michiel -- Michiel Meeuwissen mihxil' Mediacentrum 140 H'sum [] () +31 (0)35 6772979 nl_NL eo_XX en_US _______________________________________________ Developers mailing list [email protected] http://lists.mmbase.org/mailman/listinfo/developers
