Convenience method to get this array as an integer if it contains a single element. This method calls {@link JsonElement#getAsInt()} on the element, therefore any of the exceptions declared by that method can occur. @return this element as an integer if it is single element array. @throws IllegalSt
()
| 342 | * @throws IllegalStateException if the array is empty or has more than one element. |
| 343 | */ |
| 344 | @Override |
| 345 | public int getAsInt() { |
| 346 | return getAsSingleElement().getAsInt(); |
| 347 | } |
| 348 | |
| 349 | /** |
| 350 | * Convenience method to get this array as a primitive byte if it contains a single element. This |