View Javadoc

1   package org.inigma.utopia;
2   
3   public enum Relation {
4       Ceasefire("End of War Ceasefire"),
5       Hostile("Hostile"),
6       None("None"),
7       Unfriendly("Unfriendly"),
8       War("War");
9   
10      private String display;
11  
12      private Relation(String display) {
13          this.display = display;
14      }
15  
16      public String getDisplay() {
17          return display;
18      }
19  
20      public static Relation value(String display) {
21          for (Relation relation : values()) {
22              if (relation.display.equalsIgnoreCase(display)) {
23                  return relation;
24              }
25          }
26          return None;
27      }
28  }