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

Method getAsBigDecimal

gson/src/main/java/com/google/gson/JsonArray.java:291–294  ·  view source on GitHub ↗

Convenience method to get this array as a {@link BigDecimal} if it contains a single element. This method calls {@link JsonElement#getAsBigDecimal()} on the element, therefore any of the exceptions declared by that method can occur. @return this element as a {@link BigDecimal} if it is single eleme

()

Source from the content-addressed store, hash-verified

289 * @since 1.2
290 */
291 @Override
292 public BigDecimal getAsBigDecimal() {
293 return getAsSingleElement().getAsBigDecimal();
294 }
295
296 /**
297 * Convenience method to get this array as a {@link BigInteger} if it contains a single element.

Callers 1

testJsonPrimitiveMethod · 0.45

Calls 1

getAsSingleElementMethod · 0.95

Tested by 1

testJsonPrimitiveMethod · 0.36