diff --git a/app/src/main/java/com/example/sprout/refactor/messengers/NavigationMessage.java b/app/src/main/java/com/example/sprout/refactor/messengers/NavigationMessage.java new file mode 100644 index 0000000..6c5327a --- /dev/null +++ b/app/src/main/java/com/example/sprout/refactor/messengers/NavigationMessage.java @@ -0,0 +1,33 @@ +package com.example.sprout.refactor.messengers; + +/** + * 画面遷移をするために送信するObject + * + * @author matsumoto_k + */ +public class NavigationMessage { + private final Type type; + private Class clazz = null; + + public NavigationMessage(Type type, Class clazz) { + this.type = type; + this.clazz = clazz; + } + + public NavigationMessage(Type type) { + this.type = type; + } + + public enum Type { + Start, // 指定のアクティビティを開始する + Finish // アクティビティを終了する + } + + public Type getType() { + return type; + } + + public Class getClazz() { + return clazz; + } +}