比较值这里是我的情况我正在比较WallEnums的两个情况与其余的。在枚举java
import static com.gowallgo.enumtypes.WallEnums.CAW;
"" (and the rest)
/**
* {@link Set} of cancel {@link WallEnums}s
*/
private static final Set<WallEnums> WALL_CODES = asSet(RES, CAW, AAP, ASV, CQP, OQR);
// more stuff and then I use it here .
if (wallEnum != WALL_CODES.contains(wallEnum)){}
这要求重构。我应该在哪里开始,所以我不需要为每个代码进行静态导入?
你不喜欢什么? – 2015-02-10 16:00:53
'import static com.gowallgo.enumtypes.WallEnums。*'? – vikingsteve 2015-02-10 16:01:49
使用'Enum.values()'? – meskobalazs 2015-02-10 16:03:46