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

Method initProperty

code/src/java/pcgen/system/PropertyContext.java:126–135  ·  view source on GitHub ↗

Functions similarly to getProperty(key, defaultValue) but with the difference that if a property with the specified key does not exists, then the property will be set to the defaultValue argument and subsequently returned. @param key the property key @param defaultValue a default

(String key, String defaultValue)

Source from the content-addressed store, hash-verified

124 * @return the value in this property context with the specified key value.
125 */
126 public String initProperty(String key, String defaultValue)
127 {
128 String value = getProperty(key);
129 if (value != null)
130 {
131 return value;
132 }
133 setProperty(key, defaultValue);
134 return defaultValue;
135 }
136
137 /**
138 * Searches for the property with the specified key in this property context.

Callers 12

RunConvertPanelMethod · 0.95
initIntMethod · 0.95
initBooleanMethod · 0.95
initColorMethod · 0.80
initDefaultsMethod · 0.80
initDefaultsMethod · 0.80
selectDefaultSourcesMethod · 0.80
setupDisplayMethod · 0.80
performAnalysisMethod · 0.80
initSourceSelectionMethod · 0.80
initPreferencesMethod · 0.80
resetMethod · 0.80

Calls 2

getPropertyMethod · 0.95
setPropertyMethod · 0.95

Tested by

no test coverage detected