Example #1
0
 public static CityType valueFromString(String place) {
   if (place == null) {
     return null;
   }
   for (CityType t : CityType.values()) {
     if (t.name().equalsIgnoreCase(place)) {
       return t;
     }
   }
   return null;
 }
Example #2
0
 public static String valueToString(CityType t) {
   return t.toString().toLowerCase();
 }