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 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); 
 | 
    } 
 | 
} 
 |