In the UML specification 2.5.1 (Link) on page 117 it is specified that the notation of operations (methods) should look like the following:
[<visibility>] <name> ‘(‘ [<parameter-list>] ‘)’ [‘:’ [<return-type>] [‘[‘ <multiplicity-range> ‘]’]
[‘{‘ <oper-property> [‘,’ <oper-property>]* ‘}’]]
What irritates me are the blanks. If I set them as described in the specification above, then they are unfortunately not consistent with the example found in the same chapter on page 119. Here the example looks like the following:
+createWindow (location: Coordinates, container: Container [0..1]): Window
See for instance: In the example, there is no blank between the <visibility>
and the <name>
but in the specification, there is a blank between them.
Can someone help me understand this inconsistency? Why are the blanks set so strangely anyway? If one wants to make it 100% correct, how would the blanks be set?
Kind Regards and Thanks, Raphael