java.lang.Object | |
↳ | com.urbanairship.json.JsonList |
An immutable list of JsonValues.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public static final JsonList | EMPTY_LIST | Empty list. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
JsonList(List<JsonValue> list)
Default Constructor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
contains(JsonValue jsonValue)
Tests whether this
List contains the specified JSON value. | ||||||||||
boolean | equals(Object object) | ||||||||||
JsonValue |
get(int location)
Returns the element at the specified location in this
List . | ||||||||||
List<JsonValue> |
getList()
Gets the JsonList as a List.
| ||||||||||
int | hashCode() | ||||||||||
int |
indexOf(JsonValue jsonValue)
Searches this
List for the specified object and returns the index of the
first occurrence. | ||||||||||
boolean |
isEmpty()
Returns whether this
List contains no elements. | ||||||||||
Iterator<JsonValue> |
iterator()
Returns an iterator on the elements of this
List . | ||||||||||
int |
lastIndexOf(JsonValue jsonValue)
Searches this
List for the specified object and returns the index of the
first occurrence. | ||||||||||
int |
size()
Returns the number of elements in this
List . | ||||||||||
JsonValue |
toJsonValue()
Returns the objects represented as a JsonValue.
| ||||||||||
String |
toString()
Returns the JsonList as a JSON encoded String.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.urbanairship.json.JsonSerializable
| |||||||||||
From interface
java.lang.Iterable
|
Tests whether this List
contains the specified JSON value.
jsonValue | the object to search for. |
---|
true
if the list contains the value, otherwise false
.
Returns the element at the specified location in this List
.
location | the index of the element to return. |
---|
IndexOutOfBoundsException | if location < 0 || location >= size()
|
---|
Searches this List
for the specified object and returns the index of the
first occurrence.
jsonValue | the object to search for. |
---|
Returns whether this List
contains no elements.
true
if this List
has no elements, false
otherwise.Returns an iterator on the elements of this List
. The elements are
iterated in the same order as they occur in the List
.
List
.Searches this List
for the specified object and returns the index of the
first occurrence.
jsonValue | the object to search for. |
---|
Returns the number of elements in this List
.
List
.
Returns the objects represented as a JsonValue.
Returns the JsonList as a JSON encoded String.