|
@@ -11,7 +11,8 @@ import java.lang.annotation.Retention;
|
|
|
import java.lang.annotation.RetentionPolicy;
|
|
import java.lang.annotation.RetentionPolicy;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 이벤트
|
|
|
|
|
|
|
+ * View 에서 Presenter 로 전달할 이벤트 객체
|
|
|
|
|
+ * Event.Builder 를 통해서만 생성이 가능하다.
|
|
|
* <pre>
|
|
* <pre>
|
|
|
* </pre>
|
|
* </pre>
|
|
|
*
|
|
*
|
|
@@ -22,6 +23,10 @@ import java.lang.annotation.RetentionPolicy;
|
|
|
*/
|
|
*/
|
|
|
public class Event {
|
|
public class Event {
|
|
|
|
|
|
|
|
|
|
+ /***********************************
|
|
|
|
|
+ * Constants
|
|
|
|
|
+ ***********************************/
|
|
|
|
|
+
|
|
|
public static final int NONE = -1;
|
|
public static final int NONE = -1;
|
|
|
public static final int CLICK = 0;
|
|
public static final int CLICK = 0;
|
|
|
public static final int BACK = 1;
|
|
public static final int BACK = 1;
|
|
@@ -48,6 +53,9 @@ public class Event {
|
|
|
})
|
|
})
|
|
|
public @interface ID {}
|
|
public @interface ID {}
|
|
|
|
|
|
|
|
|
|
+ /***********************************
|
|
|
|
|
+ * Object
|
|
|
|
|
+ ***********************************/
|
|
|
private final int eventId;
|
|
private final int eventId;
|
|
|
private final int integer;
|
|
private final int integer;
|
|
|
private final String string;
|
|
private final String string;
|
|
@@ -107,6 +115,10 @@ public class Event {
|
|
|
return new Gson().fromJson(json, beanClass);
|
|
return new Gson().fromJson(json, beanClass);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ /***********************************
|
|
|
|
|
+ * Builder
|
|
|
|
|
+ ***********************************/
|
|
|
/**
|
|
/**
|
|
|
* Event 객체를 생성하기 위한 builder
|
|
* Event 객체를 생성하기 위한 builder
|
|
|
*/
|
|
*/
|