PIbd-21_Markov_D.P._Contain.../AdditionalEnum.java

25 lines
447 B
Java
Raw Normal View History

2022-12-01 23:30:57 +04:00
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;
}
}
}