diff --git a/app/src/main/java/j4ckall/rxflux/lib/flux/Action.java b/app/src/main/java/j4ckall/rxflux/lib/flux/Action.java new file mode 100644 index 0000000..8d9876e --- /dev/null +++ b/app/src/main/java/j4ckall/rxflux/lib/flux/Action.java @@ -0,0 +1,26 @@ +package j4ckall.rxflux.lib.flux; + +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; + +/** + * ユーザアクション毎の内容を表すクラス + * Keyはアクションを識別するためのもの + * ユーザアクションの発生毎にImmutableなインスタンスが生成される + * + * @author matsumoto_k + */ +public class Action { + public final Key key; + public final T value; + final boolean notifyStoreChanged; + + public interface Key { + } + + Action(@NonNull Key key, @Nullable T t, @NonNull boolean notifyStoreChanged) { + this.key = key; + this.value = t; + this.notifyStoreChanged = notifyStoreChanged; + } +}