mirror of
https://github.com/dnpm-dip/mv64e-mtb-dto-java.git
synced 2025-07-01 18:22:54 +00:00
Rename purple code enum items
This commit is contained in:
@ -4,16 +4,16 @@ import java.io.IOException;
|
|||||||
import com.fasterxml.jackson.annotation.*;
|
import com.fasterxml.jackson.annotation.*;
|
||||||
|
|
||||||
public enum PurpleCode {
|
public enum PurpleCode {
|
||||||
THE_0, THE_1, THE_2, THE_3, THE_4;
|
CODE_0, CODE_1, CODE_2, CODE_3, CODE_4;
|
||||||
|
|
||||||
@JsonValue
|
@JsonValue
|
||||||
public String toValue() {
|
public String toValue() {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case THE_0: return "0";
|
case CODE_0: return "0";
|
||||||
case THE_1: return "1";
|
case CODE_1: return "1";
|
||||||
case THE_2: return "2";
|
case CODE_2: return "2";
|
||||||
case THE_3: return "3";
|
case CODE_3: return "3";
|
||||||
case THE_4: return "4";
|
case CODE_4: return "4";
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -22,15 +22,15 @@ public enum PurpleCode {
|
|||||||
public static PurpleCode forValue(String value) throws IOException {
|
public static PurpleCode forValue(String value) throws IOException {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case "0":
|
case "0":
|
||||||
return THE_0;
|
return CODE_0;
|
||||||
case "1":
|
case "1":
|
||||||
return THE_1;
|
return CODE_1;
|
||||||
case "2":
|
case "2":
|
||||||
return THE_2;
|
return CODE_2;
|
||||||
case "3":
|
case "3":
|
||||||
return THE_3;
|
return CODE_3;
|
||||||
case "4":
|
case "4":
|
||||||
return THE_4;
|
return CODE_4;
|
||||||
}
|
}
|
||||||
throw new IOException("Cannot deserialize PurpleCode");
|
throw new IOException("Cannot deserialize PurpleCode");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user