blob: de4bc1652dcbb9c21dcea96389d081e42c827451 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package derms.replica.replica1;
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);
}
}
|