PrettyPipes/src/main/java/de/ellpeck/prettypipes/items/ModuleTier.java
2020-04-16 00:39:53 +02:00

22 lines
422 B
Java

package de.ellpeck.prettypipes.items;
public enum ModuleTier {
LOW,
MEDIUM,
HIGH;
public final <T> T forTier(T low, T medium, T high) {
switch (this) {
case LOW:
return low;
case MEDIUM:
return medium;
case HIGH:
return high;
default:
throw new RuntimeException();
}
}
}