MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / getBoolean

Method getBoolean

src/Config.java:194–208  ·  view source on GitHub ↗

Returns the given property as a boolean Property values are case insensitive and the following values will result in a True return value: - 1 - True - Yes Any other values, including an empty string, will result in a False @param property The property to fetch @return A parsed boolean @throws NullPo

(final String property)

Source from the content-addressed store, hash-verified

192 * @throws NullPointerException if the property was not found
193 */
194 public final boolean getBoolean(final String property) {
195
196 if (properties.containsKey(property)) {
197 final String val = properties.get(property).toUpperCase();
198
199 if (val.equals("1"))
200 return true;
201 if (val.equals("TRUE"))
202 return true;
203 if (val.equals("YES"))
204 return true;
205 }
206
207 return false;
208 }
209
210 /**
211 * Returns the directory name, making sure the end is an OS dependent slash

Callers 15

getBoolMethod · 0.95
getBool1Method · 0.95
getBoolYesMethod · 0.95
getBoolFalseMethod · 0.95
getBoolFalse0Method · 0.95
getBoolFalse2Method · 0.95
getBoolFalseNoMethod · 0.95
getBoolFalseEmptyMethod · 0.95
getBoolFalseNullMethod · 0.95

Calls 2

getMethod · 0.45
equalsMethod · 0.45

Tested by 13

getBoolMethod · 0.76
getBool1Method · 0.76
getBoolYesMethod · 0.76
getBoolFalseMethod · 0.76
getBoolFalse0Method · 0.76
getBoolFalse2Method · 0.76
getBoolFalseNoMethod · 0.76
getBoolFalseEmptyMethod · 0.76
getBoolFalseNullMethod · 0.76