-
Notifications
You must be signed in to change notification settings - Fork 0
/
SelectionControlShift.java
43 lines (37 loc) · 1.25 KB
/
SelectionControlShift.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 SelectionControlShift {
SelectionControlFlattenShift(Main.SELECTION_CONTROL_FLATTEN_SHIFT),
SelectionControlDontFlattenShift(Main.SELECTION_CONTROL_DONT_FLATTEN_SHIFT),
SelectionControlMax(Main.SELECTION_CONTROL_MAX);
private final int value;
private SelectionControlShift(int value) {
this.value = value;
}
public int getConstant() {
return this.value;
}
public static SelectionControlShift valueByStr(String str) {
switch (str) {
case "SelectionControlFlattenShift":
return SelectionControlFlattenShift;
case "SelectionControlDontFlattenShift":
return SelectionControlDontFlattenShift;
case "SelectionControlMax":
return SelectionControlMax;
default:
throw new IllegalArgumentException("Cannot translate string into enum value!");
}
}
public static SelectionControlShift valueByConstant(int constant) {
switch (constant) {
case Main.SELECTION_CONTROL_FLATTEN_SHIFT:
return SelectionControlFlattenShift;
case Main.SELECTION_CONTROL_DONT_FLATTEN_SHIFT:
return SelectionControlDontFlattenShift;
case Main.SELECTION_CONTROL_MAX:
return SelectionControlMax;
default:
throw new IllegalArgumentException("Cannot translate constant into enum value!");
}
}
}