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

Method getConstant

code/src/java/pcgen/cdom/enumeration/Region.java:99–109  ·  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

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

Calls 3

initializeTypeMapMethod · 0.95
getMethod · 0.65
putMethod · 0.65