Commit bdff1e01 by sikang

添加event接口约束

parent 1dae9236
......@@ -15,7 +15,16 @@ public final class TrackEvent {
private static String action_screen = "hold";
public enum Screen {
public interface Event {
String type();
String action();
String value();
}
public enum Screen implements Event {
/**
* 进入主页
*/
......@@ -41,9 +50,23 @@ public final class TrackEvent {
this.event = event;
}
@Override
public String type() {
return type;
}
@Override
public String action() {
return action;
}
@Override
public String value() {
return event;
}
}
public enum Click {
public enum Click implements Event {
/**
* 点击允许权限 value: 权限名
*/
......@@ -144,10 +167,25 @@ public final class TrackEvent {
this.action = action;
this.event = event;
}
@Override
public String type() {
return type;
}
@Override
public String action() {
return action;
}
@Override
public String value() {
return event;
}
}
public enum Api {
public enum Api implements Event {
/**
* FB登录成功
......@@ -214,6 +252,21 @@ public final class TrackEvent {
this.action = action;
this.event = event;
}
@Override
public String type() {
return type;
}
@Override
public String action() {
return action;
}
@Override
public String value() {
return event;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment