Returns the constant for the given String (the search for the constant is case insensitive). If the constant does not already exist, an IllegalArgumentException is thrown. @param name The name of the constant to be returned @return The Constant for the given name @throws IllegalArgumentE
(String name)
| 193 | * if the given String is not a previously defined Type |
| 194 | */ |
| 195 | public static Type valueOf(String name) |
| 196 | { |
| 197 | Type type = TYPE_MAP.get(name); |
| 198 | if (type == null) |
| 199 | { |
| 200 | throw new IllegalArgumentException(name + " is not a previously defined Type"); |
| 201 | } |
| 202 | return type; |
| 203 | } |
| 204 | |
| 205 | /** |
| 206 | * Returns a Collection of all of the Constants in this Class. |