Skip to content

Commit 2294769

Browse files
feat: create event interface
1 parent 25583fa commit 2294769

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (c) 2023. Smart Operating Block
3+
*
4+
* Use of this source code is governed by an MIT-style
5+
* license that can be found in the LICENSE file or at
6+
* https://opensource.org/licenses/MIT.
7+
*/
8+
9+
package entities.events
10+
11+
/**
12+
* The interface of a generic event.
13+
*/
14+
interface Event<E : Any> {
15+
16+
/**
17+
* The key of the event. Every type of event has its unique key.
18+
*/
19+
val key: String
20+
21+
/**
22+
* The data of the event.
23+
*/
24+
val data: E
25+
}

0 commit comments

Comments
 (0)