Suppose I have an operation that receives a parameter java Set and returns Set. How can I model that in ArgoUML? It seems I have to create a class “Set” with a Template Parameter, but I’m unable to find out how it works.
-
1Sets and other Collections should not be modeled as Classes in UML. You should consider using to-n relations instead (which can be ordered for lists etc.). For other purposes template parameters can be used to model generics... please change your question in that case :) – Christian Feb 15 '12 at 17:28
-
You know, besides data type, ArgoUML only let me configure in/out/return properties for operation parameters. I thought there should be some property to indicate that my parameter is multivalued. Is that what you are saying? In the absence of the property, I think I could use template parameters, but I still could not understand how they work… – André Feb 15 '12 at 19:56
1 Answers
A good way of seeing what capabilities are supported in ArgoUML and how they map to the UI is to reverse engineer a simple example that does what you want. Templated classes (TemplateParameters, Bindings, etc) are incompletely implemented in ArgoUML 0.34 (the current release). If you reverse engineer a class using the generic placeholder E
, you'll end up with not only a Template Parameter named E
, but another class named E
as well, so it's getting a little confused.
Unfortunately, I don't think the suggestion to use multiplicity (how you say things are multi-valued in UML) will work in this case because a) a Set
has additional semantics regarding uniqueness, etc and b) you presumably want to show the generalization to java.util.Set
, not just any old random set implementation.
You can see the placeholder for this in UI in the Template Parameters field at the bottom of the property panel for a Class. It will allow you to create a Template Parameter, but not do much else with it.
Probably the best you can do for right now is to just type your input and return parameters as plain old Set
and forego the specificity of a strongly typed Set
.

- 17,291
- 7
- 48
- 81

- 10,490
- 32
- 53