济菏高速数据中心代码
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.

35 lines
775 B

11 months ago
package com.zc.business.enums;
import lombok.Getter;
/**
* 道路方向
* @author xiepufeng
**/
@Getter
public enum LaneDirectionEnum {
11 months ago
UPWARD((byte)1, "上行"),
BIDIRECTIONAL((byte) 2, "上下行(双向)"),
DOWNWARD((byte)3, "下行");
private final byte value;
private final String description;
LaneDirectionEnum(byte value, String description) {
11 months ago
this.value = value;
this.description = description;
}
public static LaneDirectionEnum fromValue(int value) {
for (LaneDirectionEnum direction : values()) {
11 months ago
if (direction.getValue() == value) {
return direction;
}
}
throw new IllegalArgumentException("无效的LaneDirection值: " + value);
11 months ago
}
}