‘enum’ keyword defines an enum.
Example
enum TimeUnit {
DAYS
HOURS
MINUTES
}
enum.txt
@startuml
interface List{
+ int size()
+ void clear()
}
abstract class AbstractList{
# int modCount
}
class ArrayList
class LinkedList
class Serializable
enum TimeUnit {
DAYS
HOURS
MINUTES
}
List <|.. AbstractList
AbstractList <|-- ArrayList
AbstractList <|-- LinkedList
Serializable <|.. ArrayList
Serializable <|.. LinkedList
@enduml
Above
snippet generate below diagram.
No comments:
Post a Comment