I strongly advice against the suggestion of making Node implement Map. Wrapper classes are really the way to go under these circumstances. Amongst other things, they allow for several wrapper classes for different purposes, which to me sounds a lot better than adapting Node to meet EL specifications.

In addition, using a wrapper class, the demands of (for instance) EL can be met much better than by extending Node. E.g. with node extending Map it will be impossible to retreive a field named "cloud", since ${node.cloud} always evaluates to node.getCloud() instead of node.get("cloud").

The other issue is, is that Maps can be editable, and a Node can not be.
FYI, this is not correct. Maps are can be non-editable as well, in which case some of its methods are expected to throw a UnsupportedOperationException. See the Map apidoc for details.

Regards,
Rob van Maris

_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to