PIbd-23_Polevoy_S.V._SelfPr.../RollersCount.java

19 lines
315 B
Java

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());
}
}