MineLittlePony/src/main/java/com/brohoof/minelittlepony/PonyLevel.java

24 lines
487 B
Java
Raw Normal View History

2015-11-17 06:09:04 +01:00
package com.brohoof.minelittlepony;
2015-08-02 00:36:33 +02:00
public enum PonyLevel {
PONIES,
HUMANS,
MIXED;
private static final PonyLevel[] oldValues = { HUMANS, MIXED, PONIES };
public static PonyLevel parse(int intValue) {
if (intValue < 0)
intValue = 0;
if (intValue > 2)
intValue = 2;
// it's an old value
return oldValues[intValue];
}
@Override
public String toString() {
return name().toString();
}
}