zouyu
2025-11-27 eed98e551c817ead7965e08820d4b7adbc4a47f0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package com.xindao.ocr.smartjavaai.enums;
 
/**
 * @author dwj
 */
public enum PlateType {
 
    SINGLE("single", "单层"),
    DOUBLE("double", "双层"),
    UNKNOWN("unknown", "未知");
 
    private final String className;
    private final String description;
 
    PlateType(String className, String description) {
        this.className = className;
        this.description = description;
    }
 
    public String getClassName() {
        return className;
    }
 
    public String getDescription() {
        return description;
    }
 
 
 
 
    /**
     * 根据value获取对应的PlateType
     * @param className
     * @return PlateType
     */
    public static PlateType fromClassName(String className) {
        for (PlateType type : values()) {
            if (type.className.equals(className)) {
                return type;
            }
        }
        return null;
    }
 
}