[jdom-interest] non-deterministic behaviour [eg]

Jason Hunter jhunter at collab.net
Wed Apr 11 15:01:47 PDT 2001


> Now this may be a dumb question but why are you passing in a List to
> setMixedContent() rather than a JDOM specific container:
> public Element setMixedContent(JDOMList mixedContentC);
> 
> I'd like to know the reasoning because  I'm coming from a long 
> history of C++ where containers of generic objects is frowned upon.

In Java everyone has access to and uses the standard java.util
Collections package, and thus by JDOM using Collections people are
immediately comfortable with the JDOM List interactions.  By accepting a
List interface we let people pass in an ArrayList or LinkedList or
FooList or whatever and we still can work with it.

-jh-



More information about the jdom-interest mailing list