PIbd-23_Minhasapov_R.H._Exc.../RollersCount.java

19 lines
315 B
Java
Raw Permalink Normal View History

public enum RollersCount {
Four,
Five,
Six;
public int getValue() {
return switch (this) {
case Four -> 4;
case Five -> 5;
case Six -> 6;
};
}
@Override
public String toString() {
return Integer.toString(getValue());
}
}