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