Iterator

inner class Iterator : ListIterator<Json>

JSON array iterator.

Functions

Link copied to clipboard
open fun add(value: Boolean)
Add a boolean between previous and next elements.
open fun add(@NonNull object: Json)
Add an object between previous and next elements.
open fun add(@NonNull array: Json.Array)
Add an array between previous and next elements.
open fun add(@NonNull dict: Json.Dict)
Add a dictionary between previous and next elements.
open fun add(value: Double)
Add a double-precision floating-point number between previous and next elements.
open fun add(value: Int)
Add an integer between previous and next elements.
open fun add(@NonNull string: String)
Add a string between previous and next elements.
Link copied to clipboard
open fun forEachRemaining(action: Consumer<in E>)
Link copied to clipboard
open fun hasNext(): Boolean
Check if the iterator has a next element.
Link copied to clipboard
open fun hasPrevious(): Boolean
Check if the iterator has a previous element.
Link copied to clipboard
open fun isMutable(): Boolean
Check if the JSON array is mutable.
Link copied to clipboard
open fun next(): Json
Get next element and advance the iterator.
Link copied to clipboard
open fun nextIndex(): Int
Get index of the next element.
Link copied to clipboard
open fun previous(): Json
Get previous element and move the iterator back.
Link copied to clipboard
open fun previousIndex(): Int
Get index of the previous element.
Link copied to clipboard
open fun remove()
Remove the last object returned by next or previous.
Link copied to clipboard
open fun set(value: Boolean)
open fun set(@NonNull object: Json)
open fun set(@NonNull array: Json.Array)
open fun set(@NonNull dict: Json.Dict)
open fun set(value: Double)
open fun set(value: Int)
open fun set(@NonNull string: String)
Replace the last object returned by next or previous.