Java HashSet<String> words

59 views
Skip to first unread message

Patrick Cook

unread,
Feb 23, 2016, 2:13:07 AM2/23/16
to StarUML
I'm trying to add this:
      HashSet<String> words
 to a Java UML I'm working on. I've updated starUML and the Java extension. I want to add it as an operation to a class but star will not accept it. Any advise would be greatly appreciated.

fyi, this is my first time using UML, and I'm a Java novice!

Thank you for reading and any assistance you provide.
Patrick Cook

StarUML

unread,
Feb 23, 2016, 1:22:27 PM2/23/16
to StarUML
Hi Patrick,

First, you need to understand that UML syntax is different from Java syntax. So, you have to enter "words: HashSet<String>" as an Attribute, not Operation. If you want to add as an Operation, enter like "words(): HashSet<String>". Please see the http://www.uml-diagrams.org/property.html?context=class-diagrams and http://www.uml-diagrams.org/operation.html.

Thanks,
StarUML Team

2016년 2월 23일 화요일 오후 4시 13분 7초 UTC+9, Patrick Cook 님의 말:
Reply all
Reply to author
Forward
0 new messages