MCPcopy
hub / github.com/google/gson / getAsBoolean

Method getAsBoolean

src/main/java/com/google/gson/JsonPrimitive.java:127–130  ·  view source on GitHub ↗

convenience method to get this element as a boolean value. @return get this element as a primitive boolean value.

()

Source from the content-addressed store, hash-verified

125 * @return get this element as a primitive boolean value.
126 */
127 @Override
128 public boolean getAsBoolean() {
129 return isBoolean() ? getAsBooleanWrapper().booleanValue() : Boolean.parseBoolean(getAsString());
130 }
131
132 /**
133 * Check whether this primitive contains a Number.

Callers 3

testBooleanMethod · 0.95
writeMethod · 0.95

Calls 3

isBooleanMethod · 0.95
getAsBooleanWrapperMethod · 0.95
getAsStringMethod · 0.95

Tested by 2

testBooleanMethod · 0.76