Array

JSON array.

Constructors

Link copied to clipboard
constructor()
Create an empty JSON array.

Types

Link copied to clipboard
inner class Iterator : ListIterator<Json>
JSON array iterator.

Functions

Link copied to clipboard
open fun add(value: Boolean): Boolean
Add a boolean at the end of the list.
open fun add(@NonNull object: Json): Boolean
Add a JSON object at the end of the list.
open fun add(@NonNull array: Json.Array): Boolean
Add an array at the end of the list.
open fun add(@NonNull dict: Json.Dict): Boolean
Add a dictionary at the end of the list.
open fun add(value: Double): Boolean
Add a double-precision floating-point number at the end of the list.
open fun add(value: Int): Boolean
Add an integer at the end of the list.
open fun add(@NonNull string: String): Boolean
Add a string at the end of the list.
open fun add(value: Long): Boolean
Add a long at the end of the list.
open fun add(location: Int, value: Boolean)
Add a boolean at a location.
open fun add(location: Int, @NonNull object: Json)
Add a JSON object at a location.
open fun add(location: Int, @NonNull array: Json.Array)
Add an array at a location.
open fun add(location: Int, @NonNull dict: Json.Dict)
Add a dictionary at a location.
open fun add(location: Int, value: Double)
Add a double-precision floating-point number at a location.
open fun add(location: Int, value: Int)
Add an integer at a location.
open fun add(location: Int, @NonNull string: String)
Add a string at a location.
open fun add(location: Int, value: Long)
Add a long at a location.
Link copied to clipboard
open fun addAll(@NonNull collection: Collection<out Json>): Boolean
Add all objects from the specified collection at the end of the array.
open fun addAll(location: Int, @NonNull collection: Collection<out Json>): Boolean
Add all objects from the specified collection at the specified location.
Link copied to clipboard
open fun addFirst(e: E)
Link copied to clipboard
open fun addLast(e: E)
Link copied to clipboard
open fun changeThread()
Change thread this pointer can be accessed from to the current one.
Link copied to clipboard
open fun clear()
Remove all elements.
Link copied to clipboard
Deep-copy the JSON array.
Link copied to clipboard
open fun close()
Close the native pointer.
abstract fun close()
Link copied to clipboard
open fun contains(@Nullable object: Any): Boolean
Check if the JSON array contains a specified object.
Link copied to clipboard
open fun containsAll(@NonNull collection: Collection<out Any>): Boolean
Check if the JSON array contains all objects from a collection.
Link copied to clipboard
open fun <E> copyOf(coll: Collection<out E>): List<E>
Link copied to clipboard
open fun dump(@NonNull stream: OutputStream)
Dump the JSON array to an output stream.
Link copied to clipboard
open fun equals(@Nullable object: Any): Boolean
Check if the JSON array is equal to another object.
Link copied to clipboard
open fun forEach(action: Consumer<in T>)
Link copied to clipboard
open fun get(location: Int): Json
Get an object at a location.
Link copied to clipboard
open fun getAtPath(@NonNull path: String): Json
Get JSON object at path.
Link copied to clipboard
open fun getFirst(): E
Link copied to clipboard
open fun getLast(): E
Link copied to clipboard
open fun hashCode(): Int
Get array hash code.
Link copied to clipboard
open fun indexOf(@Nullable object: Any): Int
Get index of the first occurrence of an object.
Link copied to clipboard
open fun isClosed(): Boolean
Check if the native pointer is closed.
Link copied to clipboard
open fun isEmpty(): Boolean
Check if the JSON array is empty.
Link copied to clipboard
open fun isMutable(): Boolean
Check if the native pointer is mutable.
Link copied to clipboard
open fun isSamePointer(@NonNull other: Pointer): Boolean
Check if the pointer is the same as in another pointer.
Link copied to clipboard
Return a new iterator.
abstract fun iterator(): Iterator<T>
Link copied to clipboard
open fun lastIndexOf(@Nullable object: Any): Int
Get index of the last occurrence of an object.
Link copied to clipboard
Return a new list iterator.
Link copied to clipboard
open fun <E> of(): List<E>
Link copied to clipboard
open fun parallelStream(): Stream<E>
Link copied to clipboard
Parse a file with JSON array into an array.
Parse a JSON array string into an array.
Link copied to clipboard
open fun remove(location: Int): Json
open fun remove(location: Int, count: Int)
Remove an element at a location.
open fun remove(@Nullable object: Any): Boolean
Remove an element.
Link copied to clipboard
open fun removeAll(@NonNull collection: Collection<out Any>): Boolean
Remove all objects in the specified collection.
Link copied to clipboard
open fun removeFirst(): E
Link copied to clipboard
open fun removeIf(filter: Predicate<in E>): Boolean
Link copied to clipboard
open fun removeLast(): E
Link copied to clipboard
open fun replaceAll(operator: UnaryOperator<E>)
Link copied to clipboard
open fun retainAll(@NonNull collection: Collection<out Any>): Boolean
Remove all objects not in the specified collection.
Link copied to clipboard
open fun reversed(): List<E>
abstract fun reversed(): SequencedCollection<E>
Link copied to clipboard
open fun set(location: Int, value: Boolean): Json
open fun set(location: Int, @NonNull object: Json): Json
open fun set(location: Int, @NonNull value: Json.Array): Json
open fun set(location: Int, @NonNull value: Json.Dict): Json
open fun set(location: Int, value: Double): Json
open fun set(location: Int, value: Int): Json
open fun set(location: Int, @NonNull value: String): Json
Replace an element at a location.
Link copied to clipboard
open fun size(): Int
Get size of the JSON array.
Link copied to clipboard
open fun sort(c: Comparator<in E>)
Link copied to clipboard
Link copied to clipboard
open fun stream(): Stream<E>
Link copied to clipboard
open fun subList(start: Int, end: Int): Json.Array
Returns the specified portion of the JSON array.
Link copied to clipboard
open fun toArray(): Array<Any>
open fun <T> toArray(@NonNull array: Array<T>): Array<T>
Return this array as a primitive array.
Link copied to clipboard
open fun toString(): String
open fun toString(pretty: Boolean): String
Return the JSON array as a JSON string.