Convenience method to get this array as a boolean if it contains a single element. This method calls {@link JsonElement#getAsBoolean()} on the element, therefore any of the exceptions declared by that method can occur. @return this element as a boolean if it is single element array. @throws Illegal
()
| 397 | * @throws IllegalStateException if the array is empty or has more than one element. |
| 398 | */ |
| 399 | @Override |
| 400 | public boolean getAsBoolean() { |
| 401 | return getAsSingleElement().getAsBoolean(); |
| 402 | } |
| 403 | |
| 404 | /** |
| 405 | * Returns a mutable {@link List} view of this {@code JsonArray}. Changes to the {@code List} are |