peenum;/*** 客户类别* 1:集团* 2:外部* 3:金融** @author liyunfeng*/
public enum CustomerTypeEnum {ALL(-1, "请选择"),GROUP(1, "集团"),EXTERNAL(2, "外部"),FINANCE(3, "金融");private final Integer value;private final String text;private CustomerTypeEnum(Integer value, String text) {this.value = = text;}public Integer value() {return value;}public Integer getValue() {return value;}public String getText() {return text;}@Overridepublic String toString() {;}public static CustomerTypeEnum of(final Integer value) {if (value == null || ALL.value.equals(value)) {return null;}for (CustomerTypeEnum ot : values()) {if (ot.value != null && ot.value.equals(value)) {return ot;}}return null;}/*** 根据提供的value返回类型的名称** @param value* @return*/public static String getTitle(Integer value) {for (CustomerTypeEnum iite : CustomerTypeEnum.values()) {if (iite.value != null && iite.value.equals(value)) {;}}return "";}public static void main(String[] args) {System.out.println(Text());}
}
本文发布于:2024-01-31 21:40:09,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170670841031535.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |