-
Notifications
You must be signed in to change notification settings - Fork 0
/
EShClient.java
43 lines (37 loc) · 1017 Bytes
/
EShClient.java
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
package com.destranix.glslang;
public enum EShClient {
EShClientNone(Main.E_SH_CLIENT_NONE),
EShClientVulkan(Main.E_SH_CLIENT_VULKAN),
EShClientOpenGL(Main.E_SH_CLIENT_OPENGL);
private final int value;
private EShClient(int value) {
this.value = value;
}
public int getConstant() {
return this.value;
}
public static EShClient valueByStr(String str) {
switch (str) {
case "EShClientNone":
return EShClientNone;
case "EShClientVulkan":
return EShClientVulkan;
case "EShClientOpenGL":
return EShClientOpenGL;
default:
throw new IllegalArgumentException("Cannot translate string into enum value!");
}
}
public static EShClient valueByConstant(int constant) {
switch (constant) {
case Main.E_SH_CLIENT_NONE:
return EShClientNone;
case Main.E_SH_CLIENT_VULKAN:
return EShClientVulkan;
case Main.E_SH_CLIENT_OPENGL:
return EShClientOpenGL;
default:
throw new IllegalArgumentException("Cannot translate constant into enum value!");
}
}
}