MCPcopy Create free account
hub / github.com/annmuor/jnode / getBooleanProperty

Method getBooleanProperty

jnode-core/src/jnode/main/MainHandler.java:65–75  ·  view source on GitHub ↗
(String property, Boolean def)

Source from the content-addressed store, hash-verified

63 }
64
65 public boolean getBooleanProperty(String property, Boolean def) {
66 String value = getProperty(property, def.toString());
67 try {
68 int x = Integer.valueOf(value);
69 if (x > 0) {
70 return true;
71 }
72 } catch (NumberFormatException ignore) {
73 }
74 return (value.matches("^([tT][rR][uU][eE]|1)$"));
75 }
76
77 public int getIntegerProperty(String property, int def) {
78 return new Integer(getProperty(property, Integer.toString(def)));

Callers 8

runMethod · 0.80
runMethod · 0.80
getStatisticEnabledMethod · 0.80
updateConfigMethod · 0.80
tossInboundDirectoryMethod · 0.80
runMethod · 0.80
executeScriptMethod · 0.80

Calls 2

getPropertyMethod · 0.95
toStringMethod · 0.45

Tested by

no test coverage detected