File tree Expand file tree Collapse file tree 1 file changed +55
-5
lines changed Expand file tree Collapse file tree 1 file changed +55
-5
lines changed Original file line number Diff line number Diff line change 1
1
@startuml
2
2
3
- autoactivate on
4
- participant FlashcardComponent as fc
5
- participant FlashcardStorage as fs
6
- participant FlashcardDirectory as fd
3
+ participant ":FlashcardComponent" as fc
4
+ participant ":FlashcardDirectory" as fd
5
+ participant ":FlashcardStorage" as fs
6
+ participant ":FlashcardList" as fl2
7
+ participant ":FlashcardList" as fl
8
+ participant ":FlashcardStorageParser" as fp
7
9
8
- fc -> fs :
9
10
11
+ activate fc
12
+
13
+ create fd
14
+ fc -> fd ++: new
15
+
16
+ return directory :FlashcardDirectory ()
17
+
18
+ destroy fd
19
+
20
+ create fs
21
+ fc -> fs ++: FlashcardStorage(directory)
22
+
23
+ return : FlashcardStorage
24
+
25
+ fc -> fs ++ : loadFlashcards()
26
+
27
+ alt default
28
+
29
+ create fl
30
+ fs -> fl ++: FlashcardList()
31
+
32
+ return :FlashcardList
33
+
34
+
35
+
36
+ loop for all lines in file
37
+
38
+ fs -> fp ++ : loadFlashcard()
39
+
40
+ return flashcard :Flashcard
41
+
42
+ fs -> fl ++: add(flashcard)
43
+ return
44
+
45
+ end
46
+
47
+ return :FlashcardList
48
+
49
+ else FileNotFoundException
50
+
51
+
52
+ fs --> fc
53
+ create fl2
54
+ fc -> fl2 ++: FlashcardList(emptyArray)
55
+ return :FlashcardList
56
+
57
+
58
+
59
+ end
10
60
11
61
@enduml
You can’t perform that action at this time.
0 commit comments