Java com.google.gson JsonArray fields, constructors, methods, implement or subclass

Example usage for Java com.google.gson JsonArray fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.gson JsonArray.

The text is from its open source code.

Constructor

JsonArray()
Creates an empty JsonArray.
JsonArray(int capacity)

Method

voidadd(Boolean bool)
Adds the specified boolean to self.
voidadd(Character character)
Adds the specified character to self.
voidadd(Number number)
Adds the specified number to self.
voidadd(String string)
Adds the specified string to self.
voidadd(JsonElement element)
Adds the specified element to self.
voidaddAll(JsonArray array)
Adds all the elements of the specified array to self.
booleancontains(JsonElement element)
Returns true if this array contains the specified element.
JsonArraydeepCopy()
Creates a deep copy of this element and all its children
booleanequals(Object o)
JsonElementget(int i)
Returns the ith element of the array.
StringgetAsString()
convenience method to get this array as a String if it contains a single element.
Iteratoriterator()
Returns an iterator to navigate the elements of the array.
booleanremove(JsonElement element)
Removes the first occurrence of the specified element from this array, if it is present.
JsonElementremove(int index)
Removes the element at the specified position in this array.
JsonElementset(int index, JsonElement element)
Replaces the element at the specified position in this array with the specified element.
intsize()
Returns the number of elements in the array.