4

I am creating a UML class diagram for a Java Enum with multiple values. Example:

public enum ExtractType {
      Type1 ("Value1", "Value2"),
      Type2 ("Value1", "Value2"),
      ...
}

Does the UML specification say anything about including values while drawing an Enum class diagram? Or is it as simple as below?

    +---------------------+
    |   <<enumeration>>   |
    |     ExtractType     |
    +---------------------+
    |        Type1        |
    |        Type2        |
    |        .....        |
    +---------------------+
Michal Kordas
  • 10,475
  • 7
  • 58
  • 103
iNikhil19
  • 97
  • 3
  • 11
  • 2
    possible duplicate of [Uml class diagram enum](http://stackoverflow.com/questions/412944/uml-class-diagram-enum) – CubeJockey Apr 17 '15 at 20:11
  • @Trobbins I have read this post before asking the question, my question is different than this one – iNikhil19 Apr 17 '15 at 20:13
  • 1
    It would just be as simple as you've shown. Here is another resource: http://www.uml-diagrams.org/class-diagrams.html – CubeJockey Apr 17 '15 at 20:18

1 Answers1

6

Yes, your example is perfectly fine. It's described in many places in UML specification: enter image description here

Michal Kordas
  • 10,475
  • 7
  • 58
  • 103