blob: f4c315edc359cd38597d7423394797d94b9ba68f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package derms.replica.replica2;
import java.io.Serializable;
public enum ResourceName implements Serializable {
AMBULANCE,
FIRETRUCK,
PERSONNEL;
public static ResourceName parse(String s) {
switch (s) {
case "AMBULANCE": return ResourceName.AMBULANCE;
case "FIRETRUCK": return ResourceName.FIRETRUCK;
case "PERSONNEL": return ResourceName.PERSONNEL;
}
throw new IllegalArgumentException("invalid resource name: "+s);
}
}
|