toml / org.apache.tuweni.toml / TomlArray

TomlArray

interface TomlArray (source)

An array of TOML values.

Functions

containsArrays

abstract fun containsArrays(): Boolean

containsBooleans

abstract fun containsBooleans(): Boolean

containsDoubles

abstract fun containsDoubles(): Boolean

containsLocalDateTimes

abstract fun containsLocalDateTimes(): Boolean

containsLocalDates

abstract fun containsLocalDates(): Boolean

containsLocalTimes

abstract fun containsLocalTimes(): Boolean

containsLongs

abstract fun containsLongs(): Boolean

containsOffsetDateTimes

abstract fun containsOffsetDateTimes(): Boolean

containsStrings

abstract fun containsStrings(): Boolean

containsTables

abstract fun containsTables(): Boolean

get

abstract fun get(index: Int): Any

Get a value at a specified index.

getArray

open fun getArray(index: Int): TomlArray

Get an array at a specified index.

getBoolean

open fun getBoolean(index: Int): Boolean

Get a boolean at a specified index.

getDouble

open fun getDouble(index: Int): Double

Get a double at a specified index.

getLocalDate

open fun getLocalDate(index: Int): LocalDate

Get a local date at a specified index.

getLocalDateTime

open fun getLocalDateTime(index: Int): LocalDateTime

Get a local date time at a specified index.

getLocalTime

open fun getLocalTime(index: Int): LocalTime

Get a local time at a specified index.

getLong

open fun getLong(index: Int): Long

Get a long at a specified index.

getOffsetDateTime

open fun getOffsetDateTime(index: Int): OffsetDateTime

Get an offset date time at a specified index.

getString

open fun getString(index: Int): String

Get a string at a specified index.

getTable

open fun getTable(index: Int): TomlTable

Get a table at a specified index.

inputPositionOf

abstract fun inputPositionOf(index: Int): TomlPosition

Get the position where a value is defined in the TOML document.

isEmpty

abstract fun isEmpty(): Boolean

size

abstract fun size(): Int

toJson

open fun toJson(): String

Return a representation of this array using JSON.

open fun toJson(appendable: Appendable): Unit

Append a JSON representation of this array to the appendable output.

toList

abstract fun toList(): MutableList<Any>

Get the elements of this array as a List.

Note that this does not do a deep conversion. If this array contains tables or arrays, they will be of type TomlTable or TomlArray respectively.