MCPcopy Create free account
hub / github.com/PCGen/pcgen / valueOf

Method valueOf

code/src/java/pcgen/cdom/enumeration/Region.java:155–164  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

153 * if the given String is not a previously defined Region
154 */
155 public static Region valueOf(String name)
156 {
157 initializeTypeMap();
158 Region region = typeMap.get(name);
159 if (region == null)
160 {
161 throw new IllegalArgumentException(name + " is not a previously defined Region");
162 }
163 return region;
164 }
165
166 /**
167 * Returns a Collection of all of the Constants in this Class.

Callers

nothing calls this directly

Calls 2

initializeTypeMapMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected