package com.se.nsl.utils; /** * @author dcb */ public enum SimulateType { PREDICTION(1, "continue"), //预测模拟 REAL_TIME(2, "continue"), //实时模拟 HISTORY(3, "new"); //历史模拟 private int type; private String saveMode; SimulateType(int type, String saveMode) { this.type = type; this.saveMode = saveMode; } public static SimulateType of(int type) { for (SimulateType st : values()) { if (type == st.type) { return st; } } return HISTORY; } public int getType() { return type; } public String getSaveMode() { return saveMode; } }