/**
* 会议信息语言枚举类型
*/
public enum LanguageEnum
{
/**
* 中文会议信息
*/
CHINESE("中文会议", "chinese"),
/**
* 英文会议信息
*/
ENGLISH("English Meeting", "english");
private String name;
private String code;
LanguageEnum(String name, String code)
{
this.name = name;
this.code = code;
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getCode()
{
return code;
}
public void setCode(String code)
{
this.code = code;
}
public static boolean checkLanguage(String language)
{
LanguageEnum[] languageEnums = LanguageEnum.values();
for (LanguageEnum languageEnum : languageEnums)
{
if (languageEnum.code.equals(language))
{
return true;
}
}
return false;
}
public static LanguageEnum getLanguageEnumByCode(String language)
{
LanguageEnum[] languageEnums = LanguageEnum.values();
for (LanguageEnum languageEnum : languageEnums)
{
if (languageEnum.code.equals(language))
{
return languageEnum;
}
}
return null;
}
}