View Javadoc

1   package cz.cuni.amis.pogamut.emohawk.agent.module.sensomotoric;
2   
3   import java.util.HashMap;
4   
5   /**
6    * Enum holding all available Pogamut items in UnrealEngine2RuntimeDemo.
7    * @author knight
8    */
9   public enum ItemTypeUE2 {
10  
11      ITEMBALL("GBEmohawk.ItemBall"),
12      ITEMBOOK("GBEmohawk.ItemBook"),
13      ITEMBOOKOPENED("GBEmohawk.ItemBookOpened"),
14      ITEMBROCCOLI("GBEmohawk.ItemBroccoli"),
15      ITEMCONDOM("GBEmohawk.ItemCondom"),
16      ITEMCOOKER("GBEmohawk.ItemCooker"),
17      ITEMCUP("GBEmohawk.ItemCup"),
18      ITEMDICE("GBEmohawk.ItemDice"),
19      ITEMFLOWER("GBEmohawk.ItemFlower"),
20      ITEMGUN("GBEmohawk.ItemGun"),
21      ITEMHEART("GBEmohawk.ItemHeart"),
22      ITEMPLATE("GBEmohawk.ItemPlate"),
23      ITEMPOT("GBEmohawk.ItemPot"),
24      ITEMSHOES("GBEmohawk.ItemShoes"),
25      ITEMSHOESUNTIDY("GBEmohawk.ItemShoesUntidy"),
26      ITEMSOAP("GBEmohawk.ItemSoap"),
27      ITEMSOAPBOX("GBEmohawk.ItemSoapbox"),
28      ITEMSPOON("GBEmohawk.ItemSpoon"),
29      ITEMTEDDY("GBEmohawk.ItemTeddy"),
30      ITEMTOOTHBRUSH("GBEmohawk.ItemToothbrush"),
31      NONE("None");
32  
33      /** Name of the class representing the object in UE2 */
34      String unrealName;
35  
36      public static HashMap<String, ItemTypeUE2> nameMap = new HashMap();
37  
38      public static ItemTypeUE2 getItemType(String name) {
39          if (nameMap.containsKey(name))
40              return nameMap.get(name);
41          else
42              return ItemTypeUE2.NONE;
43      }
44  
45      public String getUnrealName() {
46          return unrealName;
47      }
48  
49      ItemTypeUE2(String unrealName) {
50          this.unrealName = unrealName;
51      }
52  
53      static {
54          for (ItemTypeUE2 type : ItemTypeUE2.values()) {
55              nameMap.put(type.getUnrealName(), type);
56          }
57      }
58  }