From 3a154bdb0a5aaa2c0ac3eac95a6ba747068bd454 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 13 一月 2026 10:00:37 +0800
Subject: [PATCH] 优化

---
 keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/bean/event/ActionEventData.java |   71 +++++++++++++++++++++++++++++++++++
 1 files changed, 71 insertions(+), 0 deletions(-)

diff --git a/keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/bean/event/ActionEventData.java b/keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/bean/event/ActionEventData.java
new file mode 100644
index 0000000..8f727c1
--- /dev/null
+++ b/keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/bean/event/ActionEventData.java
@@ -0,0 +1,71 @@
+package com.doumee.lib_coremodel.bean.event;
+
+import android.os.Bundle;
+
+import com.doumee.lib_coremodel.base.livedata.ActionEvent;
+
+import java.io.Serializable;
+import java.util.HashMap;
+
+public class ActionEventData implements Serializable {
+    private int action;
+    private HashMap<String,Object> data;
+
+    public ActionEventData(int action, HashMap<String, Object> data) {
+        this.action = action;
+        this.data = data;
+    }
+
+    public ActionEventData(int action, String key,Object value) {
+        this.action = action;
+        this.data = new HashMap<>();
+        this.data.put(key,value);
+    }
+
+    public ActionEventData(int type){
+        this.action = ActionEvent.Action.DO;
+        this.data = new HashMap<>();
+        this.data.put("type",type);
+    }
+
+    public ActionEventData(int type,String obj){
+        this.action = ActionEvent.Action.DO;
+        this.data = new HashMap<>();
+        this.data.put("type",type);
+        this.data.put("obj",obj);
+    }
+
+    public ActionEventData(int action,Object value) {
+        this.action = action;
+        this.data = new HashMap<>();
+        this.data.put("type",value);
+    }
+
+    public ActionEventData() {
+
+    }
+
+    public int getAction() {
+        return action;
+    }
+
+    public void setAction(int action) {
+        this.action = action;
+    }
+
+    public HashMap<String, Object> getData() {
+        return data;
+    }
+
+    public void setData(HashMap<String, Object> data) {
+        this.data = data;
+    }
+
+    public Class<?> getClassFromData(){
+        return (Class<?>) data.get(ActionEvent.ParameterField.CLASS);
+    }
+
+    public Bundle getBundleFromData(){
+        return (Bundle) data.get(ActionEvent.ParameterField.BUNDLE);
+    }
+}

--
Gitblit v1.9.3