We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0af790a commit 12d5974Copy full SHA for 12d5974
Task-Tracker-Entities-Impl/src/commonMain/kotlin/com/garbereder/tasktracker/entities/ActivityCollectionImpl.kt
@@ -0,0 +1,18 @@
1
+package com.garbereder.tasktracker.entities
2
+
3
+class ActivityCollectionImpl : ActivityCollection {
4
5
+ private val list = mutableListOf<Activity>()
6
+ override fun add(activity: Activity) {
7
+ list.add(activity)
8
+ }
9
10
+ override fun iterator(): Iterator<Activity> = list.iterator()
11
12
+ override fun remove(activity: Activity) {
13
+ if (!list.contains(activity))
14
+ throw ActivityNotFoundException(activity)
15
+ list.remove(activity)
16
17
18
+}
0 commit comments