public enum Categories {
GENERAL, LIGHTS, EFFECTS, INTERACTIVE, UI("UI"), OPTIMIZATIONS, PARSERS, ANIMATION, MATERIALS, ABOUT;
private String name;
Categories() {
name = toString().toLowerCase(Locale.getDefault());
name = name.substring(0, 1).toUpperCase(Locale.getDefault()) + name.substring(1, name.length());
}
Categories(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
在枚举中以“GENERAL, EFFECTS”开头的第一行我想知道那些是什么?特别是 UI(“UI”)。那些是常量吗?为什么 UI("UI") 有 ( 和 ) 而其余的都没有?
提前致谢...