25 lines
447 B
Java
25 lines
447 B
Java
public enum AdditionalEnum {
|
|
One,
|
|
Two,
|
|
Three;
|
|
|
|
public static AdditionalEnum FromInteger(int intValue)
|
|
{
|
|
switch(intValue)
|
|
{
|
|
case 1:
|
|
return One;
|
|
|
|
case 2:
|
|
return Two;
|
|
|
|
case 3:
|
|
return Three;
|
|
|
|
default:
|
|
System.out.println("Error: incorrect value for enum");
|
|
return null;
|
|
}
|
|
}
|
|
}
|