Convenience method to get this array as a primitive byte if it contains a single element. This method calls {@link JsonElement#getAsByte()} on the element, therefore any of the exceptions declared by that method can occur. @return this element as a primitive byte if it is single element array. @thr
()
| 355 | * @throws IllegalStateException if the array is empty or has more than one element. |
| 356 | */ |
| 357 | @Override |
| 358 | public byte getAsByte() { |
| 359 | return getAsSingleElement().getAsByte(); |
| 360 | } |
| 361 | |
| 362 | /** |
| 363 | * Convenience method to get this array as a character if it contains a single element. This |