Returns the constant for the given String (the search for the constant is case insensitive). If the constant does not already exist, a new Constant is created with the given String as the name of the Constant. @param name The name of the constant to be returned @return The Constant for t
(String name)
| 97 | * @return The Constant for the given name |
| 98 | */ |
| 99 | public static Region getConstant(String name) |
| 100 | { |
| 101 | initializeTypeMap(); |
| 102 | Region region = typeMap.get(name); |
| 103 | if (region == null) |
| 104 | { |
| 105 | region = new Region(name); |
| 106 | typeMap.put(name, region); |
| 107 | } |
| 108 | return region; |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * Thread safe construction of typeMap |