MutableArrayInterface

MutableArrayInterface defines a set of methods for getting and setting array data.

Inheritors

Properties

Link copied to clipboard
abstract val count: Int

The number of the items in the array.

Functions

Link copied to clipboard
abstract fun addArray(value: Array?): MutableArrayInterface

Adds an Array object to the end of the array.

Link copied to clipboard
abstract fun addBlob(value: Blob?): MutableArrayInterface

Adds a Blob object to the end of the array.

Link copied to clipboard

Adds a boolean value to the end of the array.

Link copied to clipboard
abstract fun addDate(value: Instant?): MutableArrayInterface

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

Link copied to clipboard

Adds a Dictionary object to the end of the array.

Link copied to clipboard
abstract fun addDouble(value: Double): MutableArrayInterface

Adds a double value to the end of the array.

Link copied to clipboard
abstract fun addFloat(value: Float): MutableArrayInterface

Adds a float value to the end of the array.

Link copied to clipboard
abstract fun addInt(value: Int): MutableArrayInterface

Adds an integer value to the end of the array.

Link copied to clipboard
abstract fun addLong(value: Long): MutableArrayInterface

Adds a long value to the end of the array.

Link copied to clipboard
abstract fun addNumber(value: Number?): MutableArrayInterface

Adds a Number object to the end of the array.

Link copied to clipboard
abstract fun addString(value: String?): MutableArrayInterface

Adds a String object to the end of the array.

Link copied to clipboard
abstract fun addValue(value: Any?): MutableArrayInterface

Adds an object to the end of the array.

Link copied to clipboard
operator fun ArrayInterface.get(index: Int): Fragment

Subscript access to a Fragment object of the projecting result value at the given index.

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

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

Link copied to clipboard
abstract 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.

Link copied to clipboard
abstract fun getBoolean(index: Int): Boolean

Gets value at the given index as a boolean.

Link copied to clipboard
abstract 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.

Link copied to clipboard
abstract override fun getDictionary(index: Int): MutableDictionary?

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

Link copied to clipboard
abstract 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.

Link copied to clipboard
abstract 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.

Link copied to clipboard
abstract 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.

Link copied to clipboard
abstract 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.

Link copied to clipboard
abstract 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.

Link copied to clipboard
abstract 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.

Link copied to clipboard
abstract 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.

Link copied to clipboard
abstract fun insertArray(index: Int, value: Array?): MutableArrayInterface

Inserts an Array object at the given index.

Link copied to clipboard
abstract fun insertBlob(index: Int, value: Blob?): MutableArrayInterface

Inserts a Blob object at the given index.

Link copied to clipboard
abstract fun insertBoolean(index: Int, value: Boolean): MutableArrayInterface

Inserts a boolean value at the given index.

Link copied to clipboard
abstract fun insertDate(index: Int, value: Instant?): MutableArrayInterface

Inserts an Instant date object at the given index.

Link copied to clipboard
abstract fun insertDictionary(index: Int, value: Dictionary?): MutableArrayInterface

Inserts a Dictionary object at the given index.

Link copied to clipboard
abstract fun insertDouble(index: Int, value: Double): MutableArrayInterface

Inserts a double value at the given index.

Link copied to clipboard
abstract fun insertFloat(index: Int, value: Float): MutableArrayInterface

Inserts a float value at the given index.

Link copied to clipboard
abstract fun insertInt(index: Int, value: Int): MutableArrayInterface

Inserts an integer value at the given index.

Link copied to clipboard
abstract fun insertLong(index: Int, value: Long): MutableArrayInterface

Inserts a long value at the given index.

Link copied to clipboard
abstract fun insertNumber(index: Int, value: Number?): MutableArrayInterface

Inserts a Number object at the given index.

Link copied to clipboard
abstract fun insertString(index: Int, value: String?): MutableArrayInterface

Inserts a String object at the given index.

Link copied to clipboard
abstract fun insertValue(index: Int, value: Any?): MutableArrayInterface

Inserts an object at the given index.

Link copied to clipboard
abstract fun remove(index: Int): MutableArrayInterface

Removes the object at the given index.

Link copied to clipboard
abstract fun setArray(index: Int, value: Array?): MutableArrayInterface

Sets an Array object at the given index.

Link copied to clipboard
abstract fun setBlob(index: Int, value: Blob?): MutableArrayInterface

Sets a Blob object at the given index.

Link copied to clipboard
abstract fun setBoolean(index: Int, value: Boolean): MutableArrayInterface

Sets a boolean value at the given index.

Link copied to clipboard
abstract fun setData(data: List<Any?>): MutableArrayInterface

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.

Link copied to clipboard
abstract fun setDate(index: Int, value: Instant?): MutableArrayInterface

Sets an Instant date object at the given index.

Link copied to clipboard
abstract fun setDictionary(index: Int, value: Dictionary?): MutableArrayInterface

Sets a Dictionary object at the given index.

Link copied to clipboard
abstract fun setDouble(index: Int, value: Double): MutableArrayInterface

Sets a double value at the given index.

Link copied to clipboard
abstract fun setFloat(index: Int, value: Float): MutableArrayInterface

Sets a float value at the given index.

Link copied to clipboard
abstract fun setInt(index: Int, value: Int): MutableArrayInterface

Sets an integer value at the given index.

Link copied to clipboard
abstract fun setJSON(json: String): MutableArrayInterface

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.

Link copied to clipboard
abstract fun setLong(index: Int, value: Long): MutableArrayInterface

Sets an integer value at the given index.

Link copied to clipboard
abstract fun setNumber(index: Int, value: Number?): MutableArrayInterface

Sets an NSNumber object at the given index.

Link copied to clipboard
abstract fun setString(index: Int, value: String?): MutableArrayInterface

Sets a String object at the given index.

Link copied to clipboard
abstract fun setValue(index: Int, value: Any?): MutableArrayInterface

Set an object at the given index.

Link copied to clipboard
abstract fun toJSON(): String

Encode an Array as a JSON string

Link copied to clipboard
abstract 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.