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

Method getAsCharacter

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

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

()

Source from the content-addressed store, hash-verified

370 * a string's first character.
371 */
372 @Deprecated
373 @Override
374 public char getAsCharacter() {
375 return getAsSingleElement().getAsCharacter();
376 }
377
378 /**
379 * Convenience method to get this array as a primitive short if it contains a single element. This

Callers

nothing calls this directly

Calls 1

getAsSingleElementMethod · 0.95

Tested by

no test coverage detected