-
Method Summary
Return the ith element of the array as a JsonArray.
default <V> V
Return the ith element of the array.
Return the ith element of the array.
Return the ith element of the array as a JsonObject.
default <T> T
default int
Returns the first index of the given value, or -1 if it cannot be found.
int
Returns the first index of the given element, or -1 if it cannot be found.
Set a given index to the given array.
Set a given index to the given object.
Pushes the given element onto the end of the array.
void
Pushes the given element onto the end of the array.
Set a given index to the given element.
Set a given index to the given array.
Set a given index to the given object.
Set a given index to the given value.
void
Set a given index to the given value.
Set a given index to the given scalar.
getBoolean, getBoolean, getDouble, getDouble, getInteger, getInteger, getLong, getLong, getScalar, getString, getString, isArray, isNull, isObject, isScalar, iterator, size
-
Method Details
-
-
indexOfNativeElement
int indexOfNativeElement(Object element)
Returns the first index of the given element, or -1 if it cannot be found.
-
indexOf
default int indexOf(Object value)
Returns the first index of the given value, or -1 if it cannot be found.
- Specified by:
indexOf
in interface ReadOnlyAstArray
-
getNativeElement
Object getNativeElement(int index)
Return the ith element of the array.
-
getElement
default <V> V getElement(int index)
Return the ith element of the array. Most consuming call.
- Specified by:
getElement
in interface ReadOnlyAstArray
-
getObject
Return the ith element of the array as a JsonObject. If the type is not an object, this can result in runtime errors.
- Specified by:
getObject
in interface ReadOnlyAstArray
-
getArray
Return the ith element of the array as a JsonArray. If the type is not an array, this can result in runtime errors.
- Specified by:
getArray
in interface ReadOnlyAstArray
-
-
pushNativeElement
void pushNativeElement(Object element)
Pushes the given element onto the end of the array. Fluent API (return this).
-
setNativeElement
void setNativeElement(int index,
Object value)
Set a given index to the given value. Fluent API (return this).
-
push
Pushes the given element onto the end of the array. Most consuming call.
- Specified by:
push
in interface AstArray
-
-
-
pushScalar
Set a given index to the given element.
- Specified by:
pushScalar
in interface AstArray
-
set
Set a given index to the given value. Most consuming call.
- Specified by:
set
in interface AstArray
-
-
-
setScalar
Set a given index to the given scalar.
- Specified by:
setScalar
in interface AstArray