1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.tanpu.fund.enums;
public enum ProStrategyEnums {
SHARES(1, "股票策略"),
MACROSCOPIC(2, "宏观策略"),
FUTURES(3, "管理期货"),
EVENTDRIVEN(4, "事件驱动"),
RELATIVEVALUE(5, "相对价值策略"),
FIXEDINCOME(6, "固定收益策略"),
COMBINEFUND(7, "组合基金"),
REUNITEWIT(8, "复合策略"),
OTHER(-1, "复合策略");
private Integer type;
private String name;
ProStrategyEnums(Integer type, String name) {
this.type = type;
this.name = name;
}
public Integer getType() {
return type;
}
public String getName() {
return name;
}
public static String getName(Integer code) {
ProStrategyEnums[] types = values();
for (ProStrategyEnums p : types) {
if (code.equals(p.getType())) {
return p.getName();
}
}
return null;
}
}