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

Method getConstant

code/src/java/pcgen/cdom/enumeration/VariableKey.java:89–99  ·  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, 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)

Source from the content-addressed store, hash-verified

87 * @return The Constant for the given name
88 */
89 public static VariableKey getConstant(String name)
90 {
91 initializeTypeMap();
92 VariableKey key = typeMap.get(name);
93 if (key == null)
94 {
95 key = new VariableKey(name);
96 typeMap.put(name, key);
97 }
98 return key;
99 }
100
101 /**
102 * Thread safe construction of typeMap

Callers 15

setUpMethod · 0.95
setUpMethod · 0.95
testGetVariableValue1Method · 0.95
setUpMethod · 0.95
testVarBonusMethod · 0.95

Calls 3

initializeTypeMapMethod · 0.95
getMethod · 0.65
putMethod · 0.65

Tested by 15

setUpMethod · 0.76
setUpMethod · 0.76
testGetVariableValue1Method · 0.76
setUpMethod · 0.76
testVarBonusMethod · 0.76