MutableArray

expect class MutableArray : Array(source)

Mutable access to array data.

actual class MutableArray : Array(source)
actual class MutableArray : Array(source)

Constructors

Link copied to clipboard
expect constructor()

Construct a new empty Array object.

expect constructor(data: List<Any?>)

Creates a new MutableArray with content from the passed List. Allowed value types are List, Instant, Map, Number, null, String, Array, Blob, and Dictionary. If present, Lists, Arrays, Maps and Dictionaries may contain only the above types.

expect constructor(json: String)

Creates a new MutableArray with content from the passed JSON string.

actual constructor()
actual constructor(data: List<Any?>)
actual constructor(json: String)
actual constructor()
actual constructor(data: List<Any?>)
actual constructor(json: String)

Properties

Link copied to clipboard
open override val actual: FLMutableArray
Link copied to clipboard
expect val count: Int

The number of the items in the array.

actual val count: Int
actual val count: Int

Functions

Link copied to clipboard
expect fun addArray(value: Array?): MutableArray

Adds an Array object to the end of the array.

actual fun addArray(value: Array?): MutableArray
actual fun addArray(value: Array?): MutableArray
Link copied to clipboard
expect fun addBlob(value: Blob?): MutableArray

Adds a Blob object to the end of the array.

actual fun addBlob(value: Blob?): MutableArray
actual fun addBlob(value: Blob?): MutableArray
Link copied to clipboard
expect fun addBoolean(value: Boolean): MutableArray

Adds a boolean value to the end of the array.

actual fun addBoolean(value: Boolean): MutableArray
actual fun addBoolean(value: Boolean): MutableArray
Link copied to clipboard
expect fun addDate(value: Instant?): MutableArray

Adds an Instant date object to the end of the array.

actual fun addDate(value: Instant?): MutableArray
actual fun addDate(value: Instant?): MutableArray
Link copied to clipboard

Adds a Dictionary object to the end of the array.

Link copied to clipboard
expect fun addDouble(value: Double): MutableArray

Adds a double value to the end of the array.

actual fun addDouble(value: Double): MutableArray
actual fun addDouble(value: Double): MutableArray
Link copied to clipboard
expect fun addFloat(value: Float): MutableArray

Adds a float value to the end of the array.

actual fun addFloat(value: Float): MutableArray
actual fun addFloat(value: Float): MutableArray
Link copied to clipboard
expect fun addInt(value: Int): MutableArray

Adds an integer value to the end of the array.

actual fun addInt(value: Int): MutableArray
actual fun addInt(value: Int): MutableArray
Link copied to clipboard
expect fun addLong(value: Long): MutableArray

Adds a long value to the end of the array.

actual fun addLong(value: Long): MutableArray
actual fun addLong(value: Long): MutableArray
Link copied to clipboard
expect fun addNumber(value: Number?): MutableArray

Adds a Number object to the end of the array.

actual fun addNumber(value: Number?): MutableArray
actual fun addNumber(value: Number?): MutableArray
Link copied to clipboard
expect fun addString(value: String?): MutableArray

Adds a String object to the end of the array.

actual fun addString(value: String?): MutableArray
actual fun addString(value: String?): MutableArray
Link copied to clipboard
expect fun addValue(value: Any?): MutableArray

Adds an object to the end of the array.

actual fun addValue(value: Any?): MutableArray
actual fun addValue(value: Any?): MutableArray
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
operator fun Array.get(index: Int): Fragment

Subscript access to a Fragment object by index.

operator fun MutableArray.get(index: Int): MutableFragment

Subscripting access to a MutableFragment object that represents the value at the given index.

Link copied to clipboard
expect open override fun getArray(index: Int): MutableArray?

Gets an Array at the given index. Return null if the value is not an array.

actual open override fun getArray(index: Int): MutableArray?
actual open override fun getArray(index: Int): MutableArray?
Link copied to clipboard
expect fun getBlob(index: Int): Blob?

Gets value at the given index as a Blob. Returns null if the value doesn't exist, or its value is not a Blob.

actual fun getBlob(index: Int): Blob?
open override fun getBlob(index: Int): Blob?
Link copied to clipboard
expect fun getBoolean(index: Int): Boolean

Gets value at the given index as a boolean.

actual fun getBoolean(index: Int): Boolean
actual fun getBoolean(index: Int): Boolean
Link copied to clipboard
expect fun getDate(index: Int): Instant?

Gets value at the given index as a Date. JSON does not directly support dates, so the actual property value must be a string, which is then parsed according to the ISO-8601 date format (the default used in JSON.) Returns null if the value doesn't exist, is not a string, or is not parsable as a date. NOTE: This is not a generic date parser! It only recognizes the ISO-8601 format, with or without milliseconds.

actual fun getDate(index: Int): Instant?
actual fun getDate(index: Int): Instant?
Link copied to clipboard
expect open override fun getDictionary(index: Int): MutableDictionary?

Gets a Dictionary at the given index. Return null if the value is not a dictionary.

actual open override fun getDictionary(index: Int): MutableDictionary?
actual open override fun getDictionary(index: Int): MutableDictionary?
Link copied to clipboard
expect fun getDouble(index: Int): Double

Gets value at the given index as a double. Integers will be converted to double. The value true is returned as 1.0, false as 0.0. Returns 0.0 if the property doesn't exist or does not have a numeric value.

actual fun getDouble(index: Int): Double
actual fun getDouble(index: Int): Double
Link copied to clipboard
expect fun getFloat(index: Int): Float

Gets value at the given index as a float. Integers will be converted to float. The value true is returned as 1.0, false as 0.0. Returns 0.0 if the value doesn't exist or does not have a numeric value.

actual fun getFloat(index: Int): Float
actual fun getFloat(index: Int): Float
Link copied to clipboard
expect fun getInt(index: Int): Int

Gets value at the given index as an int. Floating point values will be rounded. The value true is returned as 1, false as 0. Returns 0 if the value doesn't exist or does not have a numeric value.

actual fun getInt(index: Int): Int
actual fun getInt(index: Int): Int
Link copied to clipboard
expect fun getLong(index: Int): Long

Gets value at the given index as a long. Floating point values will be rounded. The value true is returned as 1, false as 0. Returns 0 if the value doesn't exist or does not have a numeric value.

actual fun getLong(index: Int): Long
actual fun getLong(index: Int): Long
Link copied to clipboard
expect fun getNumber(index: Int): Number?

Gets value at the given index as a Number. Returns null if the value doesn't exist, or its value is not a Number.

actual fun getNumber(index: Int): Number?
actual fun getNumber(index: Int): Number?
Link copied to clipboard
expect fun getString(index: Int): String?

Gets value at the given index as a String. Returns null if the value doesn't exist, or its value is not a String.

actual fun getString(index: Int): String?
actual fun getString(index: Int): String?
Link copied to clipboard
expect fun getValue(index: Int): Any?

Gets value at the given index as an object. The object types are Blob, Array, Dictionary, Number, or String based on the underlying data type; or null if the value is null.

actual fun getValue(index: Int): Any?
open override fun getValue(index: Int): Any?
Link copied to clipboard
open override fun hashCode(): Int
open override fun hashCode(): Int
Link copied to clipboard
expect fun insertArray(index: Int, value: Array?): MutableArray

Inserts an Array object at the given index.

actual fun insertArray(index: Int, value: Array?): MutableArray
actual fun insertArray(index: Int, value: Array?): MutableArray
Link copied to clipboard
expect fun insertBlob(index: Int, value: Blob?): MutableArray

Inserts a Blob object at the given index.

actual fun insertBlob(index: Int, value: Blob?): MutableArray
actual fun insertBlob(index: Int, value: Blob?): MutableArray
Link copied to clipboard
expect fun insertBoolean(index: Int, value: Boolean): MutableArray

Inserts a boolean value at the given index.

actual fun insertBoolean(index: Int, value: Boolean): MutableArray
actual fun insertBoolean(index: Int, value: Boolean): MutableArray
Link copied to clipboard
expect fun insertDate(index: Int, value: Instant?): MutableArray

Inserts an Instant date object at the given index.

actual fun insertDate(index: Int, value: Instant?): MutableArray
actual fun insertDate(index: Int, value: Instant?): MutableArray
Link copied to clipboard
expect fun insertDictionary(index: Int, value: Dictionary?): MutableArray

Inserts a Dictionary object at the given index.

actual fun insertDictionary(index: Int, value: Dictionary?): MutableArray
actual fun insertDictionary(index: Int, value: Dictionary?): MutableArray
Link copied to clipboard
expect fun insertDouble(index: Int, value: Double): MutableArray

Inserts a double value at the given index.

actual fun insertDouble(index: Int, value: Double): MutableArray
actual fun insertDouble(index: Int, value: Double): MutableArray
Link copied to clipboard
expect fun insertFloat(index: Int, value: Float): MutableArray

Inserts a float value at the given index.

actual fun insertFloat(index: Int, value: Float): MutableArray
actual fun insertFloat(index: Int, value: Float): MutableArray
Link copied to clipboard
expect fun insertInt(index: Int, value: Int): MutableArray

Inserts an integer value at the given index.

actual fun insertInt(index: Int, value: Int): MutableArray
actual fun insertInt(index: Int, value: Int): MutableArray
Link copied to clipboard
expect fun insertLong(index: Int, value: Long): MutableArray

Inserts a long value at the given index.

actual fun insertLong(index: Int, value: Long): MutableArray
actual fun insertLong(index: Int, value: Long): MutableArray
Link copied to clipboard
expect fun insertNumber(index: Int, value: Number?): MutableArray

Inserts a Number object at the given index.

actual fun insertNumber(index: Int, value: Number?): MutableArray
actual fun insertNumber(index: Int, value: Number?): MutableArray
Link copied to clipboard
expect fun insertString(index: Int, value: String?): MutableArray

Inserts a String object at the given index.

actual fun insertString(index: Int, value: String?): MutableArray
actual fun insertString(index: Int, value: String?): MutableArray
Link copied to clipboard
expect fun insertValue(index: Int, value: Any?): MutableArray

Inserts an object at the given index.

actual fun insertValue(index: Int, value: Any?): MutableArray
actual fun insertValue(index: Int, value: Any?): MutableArray
Link copied to clipboard
expect open operator override fun iterator(): Iterator<Any?>

An iterator over elements of this array. A call to the next() method of the returned iterator will throw a ConcurrentModificationException, if the MutableArray is modified while it is in use.

actual open operator override fun iterator(): Iterator<Any?>
actual open operator override fun iterator(): Iterator<Any?>
Link copied to clipboard
expect fun remove(index: Int): MutableArray

Removes the object at the given index.

actual fun remove(index: Int): MutableArray
actual fun remove(index: Int): MutableArray
Link copied to clipboard
expect fun setArray(index: Int, value: Array?): MutableArray

Sets an Array object at the given index.

actual fun setArray(index: Int, value: Array?): MutableArray
actual fun setArray(index: Int, value: Array?): MutableArray
Link copied to clipboard
expect fun setBlob(index: Int, value: Blob?): MutableArray

Sets a Blob object at the given index.

actual fun setBlob(index: Int, value: Blob?): MutableArray
actual fun setBlob(index: Int, value: Blob?): MutableArray
Link copied to clipboard
expect fun setBoolean(index: Int, value: Boolean): MutableArray

Sets a boolean value at the given index.

actual fun setBoolean(index: Int, value: Boolean): MutableArray
actual fun setBoolean(index: Int, value: Boolean): MutableArray
Link copied to clipboard
expect fun setData(data: List<Any?>): MutableArray

Populate an array with content from a List. Allowed value types are List, Instant, Map, Number, null, String, Array, Blob, and Dictionary. If present, Lists, Arrays, Maps and Dictionaries may contain only the above types. Setting the array content will replace the current data including any existing Array and Dictionary objects.

actual fun setData(data: List<Any?>): MutableArray
actual fun setData(data: List<Any?>): MutableArray
Link copied to clipboard
expect fun setDate(index: Int, value: Instant?): MutableArray

Sets an Instant date object at the given index.

actual fun setDate(index: Int, value: Instant?): MutableArray
actual fun setDate(index: Int, value: Instant?): MutableArray
Link copied to clipboard
expect fun setDictionary(index: Int, value: Dictionary?): MutableArray

Sets a Dictionary object at the given index.

actual fun setDictionary(index: Int, value: Dictionary?): MutableArray
actual fun setDictionary(index: Int, value: Dictionary?): MutableArray
Link copied to clipboard
expect fun setDouble(index: Int, value: Double): MutableArray

Sets a double value at the given index.

actual fun setDouble(index: Int, value: Double): MutableArray
actual fun setDouble(index: Int, value: Double): MutableArray
Link copied to clipboard
expect fun setFloat(index: Int, value: Float): MutableArray

Sets a float value at the given index.

actual fun setFloat(index: Int, value: Float): MutableArray
actual fun setFloat(index: Int, value: Float): MutableArray
Link copied to clipboard
expect fun setInt(index: Int, value: Int): MutableArray

Sets an integer value at the given index.

actual fun setInt(index: Int, value: Int): MutableArray
actual fun setInt(index: Int, value: Int): MutableArray
Link copied to clipboard
expect fun setJSON(json: String): MutableArray

Populate an array with content from a JSON string. Allowed value types are List, Instant, Map, Number, null, String, Array, Blob, and Dictionary. If present, Lists, Arrays, Maps and Dictionaries may contain only the above types. Setting the array content will replace the current data including any existing Array and Dictionary objects.

actual fun setJSON(json: String): MutableArray
actual fun setJSON(json: String): MutableArray
Link copied to clipboard
expect fun setLong(index: Int, value: Long): MutableArray

Sets an integer value at the given index.

actual fun setLong(index: Int, value: Long): MutableArray
actual fun setLong(index: Int, value: Long): MutableArray
Link copied to clipboard
expect fun setNumber(index: Int, value: Number?): MutableArray

Sets an NSNumber object at the given index.

actual fun setNumber(index: Int, value: Number?): MutableArray
actual fun setNumber(index: Int, value: Number?): MutableArray
Link copied to clipboard
expect fun setString(index: Int, value: String?): MutableArray

Sets a String object at the given index.

actual fun setString(index: Int, value: String?): MutableArray
actual fun setString(index: Int, value: String?): MutableArray
Link copied to clipboard
expect fun setValue(index: Int, value: Any?): MutableArray

Set an object at the given index.

actual fun setValue(index: Int, value: Any?): MutableArray
actual fun setValue(index: Int, value: Any?): MutableArray
Link copied to clipboard
expect fun toJSON(): String
actual fun toJSON(): String
open override fun toJSON(): String
Link copied to clipboard
expect fun toList(): List<Any?>

Gets content of the current object as a List. The values contained in the returned List object are all JSON based values.

actual fun toList(): List<Any?>
actual fun toList(): List<Any?>
Link copied to clipboard
expect fun toMutable(): MutableArray

Return a mutable copy of the array

actual fun toMutable(): MutableArray
actual fun toMutable(): MutableArray
Link copied to clipboard
open override fun toString(): String
open override fun toString(): String