package com.zy.core.enums; public enum RouteCollectCountType { INTERSECTION(0, "交集"), // 交集 DIFFERENCESET(1, "差集"), // 差集 UNION(2, "并集"), //并集 DEDUPLICATIONUNION(3, "去重并集"), //去重并集 ; public Integer id; public String desc; RouteCollectCountType(Integer id, String desc) { this.id = id; this.desc = desc; } public static RouteCollectCountType get(Short id) { if (null == id) { return null; } for (RouteCollectCountType type : RouteCollectCountType.values()) { if (type.id.equals(id.intValue())) { return type; } } return null; } public static RouteCollectCountType get(RouteCollectCountType type) { if (null == type) { return null; } for (RouteCollectCountType crnLiftPosType : RouteCollectCountType.values()) { if (crnLiftPosType == type) { return crnLiftPosType; } } return null; } }