I am created an enum with the following code:
public enum Operation {
a('0'), b('1');
}
After which I have byte 0 or 1.
Now I need a static class in this enum to get the appropriate enum from a byte:
public static Operation fromValue(byte value){ ...}
How I can do this ?
Something like this?