Convenience method to get this array as a long if it contains a single element. This method calls {@link JsonElement#getAsLong()} on the element, therefore any of the exceptions declared by that method can occur. @return this element as a long if it is single element array. @throws IllegalStateExce
()
| 329 | * @throws IllegalStateException if the array is empty or has more than one element. |
| 330 | */ |
| 331 | @Override |
| 332 | public long getAsLong() { |
| 333 | return getAsSingleElement().getAsLong(); |
| 334 | } |
| 335 | |
| 336 | /** |
| 337 | * Convenience method to get this array as an integer if it contains a single element. This method |