Action invoke systeem verbeterd en nette exceptions geintroduceerd.
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
package pm.event;
|
||||
|
||||
import pm.action.Action;
|
||||
|
||||
public class ApplicationEvent extends Event {
|
||||
public ApplicationEvent(Action action) {
|
||||
super(action);
|
||||
}
|
||||
}
|
||||
@@ -2,13 +2,19 @@ package pm.event;
|
||||
|
||||
import pm.action.Action;
|
||||
|
||||
public abstract class Event {
|
||||
public class Event {
|
||||
protected Type type;
|
||||
protected Action action;
|
||||
|
||||
public Event(Action action) {
|
||||
public Event(Type type, Action action) {
|
||||
this.type = type;
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
|
||||
public Type getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public Action getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
5
java/src/pm/event/Type.java
Normal file
5
java/src/pm/event/Type.java
Normal file
@@ -0,0 +1,5 @@
|
||||
package pm.event;
|
||||
|
||||
public enum Type {
|
||||
MAIN, APPLICATION;
|
||||
}
|
||||
Reference in New Issue
Block a user