This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I'm trying to draw the following in a UML class diagram.
How do you think it should look like?
Take a look a the third diagram (Figure 6-20) on this page.
I think your nested generic would have to be notated in two pieces:
The question is could you do that without having to come up with a name for the intermediate Map<String,String> class?
Then again, Figure 6-19 on that page shows the generic type just written out as the class name. That seems to imply that you could use List<Map<String,String>> as the name of the class without having to use the parameterized class notation or defining a new class (such as EmployeeSet in Fig 6-20).
EDIT: Of course it might help if I actually responded to your question. :-)
I'd show the super/sub-class relation between List<> and ArrayList<>, both as parameterized classes, and then show another class (perhaps anonymous) as a bound element of ArrayList<> with the template parameter bound to Map<String,String>.
Then DATA_SET is an instance of class StringStringMapArrayList.
That combines the two notations given in the page I mentioned earlier. It uses the simple C++, as that page calls it, notation for Map<String,String>but then uses the more verbose parameterized class notation to show the relations between the List and ArrayList generics.
Oops... I forgot List is "just" an interface. That modifies class diagram just a touch: