You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
two_project/src/main/java/com/mathgenerator/model/Level.java

28 lines
629 B

package com.mathgenerator.model;
/**
* 学段枚举,用于类型安全地表示小学、初中和高中。
*/
public enum Level {
PRIMARY("小学"),
JUNIOR_HIGH("初中"),
SENIOR_HIGH("高中");
private final String chineseName;
/**
* 枚举的构造函数。
*
* @param chineseName 学段对应的中文名称。
*/
Level(String chineseName) {
this.chineseName = chineseName;
}
/**
* 获取学段的中文名称。
*
* @return 表示学段的中文名称字符串。
*/
public String getChineseName() {
return chineseName;
}
}