Private 属性 | |
| final List< JsonElement > | elements |
额外继承的成员函数 | |
包函数 继承自 com.google.gson.JsonElement | |
| Boolean | getAsBooleanWrapper () |
A class representing an array type in Json. An array is a list of JsonElements each of which can be of a different type. This is an ordered list, meaning that the order in which elements are added is preserved.
|
inline |
Creates an empty JsonArray.
|
inline |
Adds the specified element to self.
| element | the element that needs to be added to the array. |
|
inline |
Adds all the elements of the specified array to self.
| array | the array whose elements need to be added to the array. |
|
inline |
|
inline |
Returns the ith element of the array.
| i | the index of the element that is being sought. |
| IndexOutOfBoundsException | if i is negative or greater than or equal to the size() of the array. |
|
inline |
convenience method to get this array as a BigDecimal if it contains a single element.
| ClassCastException | if the element in the array is of not a JsonPrimitive. |
| NumberFormatException | if the element at index 0 is not a valid BigDecimal. |
| IllegalStateException | if the array has more than one element. |
|
inline |
convenience method to get this array as a BigInteger if it contains a single element.
| ClassCastException | if the element in the array is of not a JsonPrimitive. |
| NumberFormatException | if the element at index 0 is not a valid BigInteger. |
| IllegalStateException | if the array has more than one element. |
|
inline |
convenience method to get this array as a boolean if it contains a single element.
| ClassCastException | if the element in the array is of not a JsonPrimitive and is not a valid boolean. |
| IllegalStateException | if the array has more than one element. |
|
inline |
|
inline |
|
inline |
convenience method to get this array as a double if it contains a single element.
| ClassCastException | if the element in the array is of not a JsonPrimitive and is not a valid double. |
| IllegalStateException | if the array has more than one element. |
|
inline |
convenience method to get this array as a float if it contains a single element.
| ClassCastException | if the element in the array is of not a JsonPrimitive and is not a valid float. |
| IllegalStateException | if the array has more than one element. |
|
inline |
convenience method to get this array as an integer if it contains a single element.
| ClassCastException | if the element in the array is of not a JsonPrimitive and is not a valid integer. |
| IllegalStateException | if the array has more than one element. |
|
inline |
convenience method to get this array as a long if it contains a single element.
| ClassCastException | if the element in the array is of not a JsonPrimitive and is not a valid long. |
| IllegalStateException | if the array has more than one element. |
|
inline |
convenience method to get this array as a Number if it contains a single element.
| ClassCastException | if the element in the array is of not a JsonPrimitive and is not a valid Number. |
| IllegalStateException | if the array has more than one element. |
|
inline |
convenience method to get this array as a primitive short if it contains a single element.
| ClassCastException | if the element in the array is of not a JsonPrimitive and is not a valid short. |
| IllegalStateException | if the array has more than one element. |
|
inline |
convenience method to get this array as a String if it contains a single element.
| ClassCastException | if the element in the array is of not a JsonPrimitive and is not a valid String. |
| IllegalStateException | if the array has more than one element. |
|
inline |
|
inline |
Returns an iterator to navigate the elemetns of the array. Since the array is an ordered list, the iterator navigates the elements in the order they were inserted.
|
inline |
Returns the number of elements in the array.
|
private |
1.8.8