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

Method valueOf

code/src/java/pcgen/cdom/enumeration/VariableKey.java:123–132  ·  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

121 * if the given String is not a previously defined VariableKey
122 */
123 public static VariableKey valueOf(String name)
124 {
125 initializeTypeMap();
126 VariableKey key = typeMap.get(name);
127 if (key == null)
128 {
129 throw new IllegalArgumentException(name + " is not a previously defined VariableKey");
130 }
131 return key;
132 }
133
134 /**
135 * Clears all of the Constants in this Class (forgetting the mapping from

Callers 2

getVariableMethod · 0.95
hasVariableMethod · 0.95

Calls 2

initializeTypeMapMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected