TomlArrayBuilder

class TomlArrayBuilder(initialCapacity: Int = 8)(source)

The builder for buildTomlArray { ... } factory function.

Constructors

Link copied to clipboard
constructor(initialCapacity: Int = 8)

Functions

Link copied to clipboard
fun TomlArrayBuilder.array(vararg elementAnnotations: Annotation, block: TomlArrayBuilder.() -> Unit)
fun TomlArrayBuilder.array(elementAnnotations: List<Annotation> = emptyList(), block: TomlArrayBuilder.() -> Unit)

Adds a TomlArray built with block to this array and annotates it with elementAnnotations.

Link copied to clipboard

Creates a read-only copy based on current configuration.

Link copied to clipboard
fun element(element: TomlElement, elementAnnotations: List<Annotation> = emptyList())

Adds element to this array and annotates it with elementAnnotations.

Link copied to clipboard
fun TomlArrayBuilder.element(element: TomlElement, vararg elementAnnotations: Annotation)

Adds element to this array and annotates it with elementAnnotations.

Link copied to clipboard
fun elements(elements: List<TomlElement>, annotations: List<List<Annotation>> = List(elements.size) { emptyList() })

Adds elements and their annotations to this array.

Link copied to clipboard
fun TomlArrayBuilder.literal(boolean: Boolean, vararg elementAnnotations: Annotation)
fun TomlArrayBuilder.literal(boolean: Boolean, elementAnnotations: List<Annotation> = emptyList())

Adds boolean to this array and annotates it with elementAnnotations.

fun TomlArrayBuilder.literal(float: Double, vararg elementAnnotations: Annotation)
fun TomlArrayBuilder.literal(float: Double, elementAnnotations: List<Annotation> = emptyList())

Adds float to this array and annotates it with elementAnnotations.

fun TomlArrayBuilder.literal(integer: Long, vararg elementAnnotations: Annotation)
fun TomlArrayBuilder.literal(integer: Long, elementAnnotations: List<Annotation> = emptyList())

Adds integer to this array and annotates it with elementAnnotations.

fun TomlArrayBuilder.literal(string: String, vararg elementAnnotations: Annotation)
fun TomlArrayBuilder.literal(string: String, elementAnnotations: List<Annotation> = emptyList())

Adds string to this array and annotates it with elementAnnotations.

fun TomlArrayBuilder.literal(localDate: NativeLocalDate, vararg elementAnnotations: Annotation)
fun TomlArrayBuilder.literal(localDate: NativeLocalDate, elementAnnotations: List<Annotation> = emptyList())

Adds localDate to this array and annotates it with elementAnnotations.

fun TomlArrayBuilder.literal(localDateTime: NativeLocalDateTime, vararg elementAnnotations: Annotation)
fun TomlArrayBuilder.literal(localDateTime: NativeLocalDateTime, elementAnnotations: List<Annotation> = emptyList())

Adds localDateTime to this array and annotates it with elementAnnotations.

fun TomlArrayBuilder.literal(localTime: NativeLocalTime, vararg elementAnnotations: Annotation)
fun TomlArrayBuilder.literal(localTime: NativeLocalTime, elementAnnotations: List<Annotation> = emptyList())

Adds localTime to this array and annotates it with elementAnnotations.

fun TomlArrayBuilder.literal(offsetDateTime: NativeOffsetDateTime, vararg elementAnnotations: Annotation)
fun TomlArrayBuilder.literal(offsetDateTime: NativeOffsetDateTime, elementAnnotations: List<Annotation> = emptyList())

Adds offsetDateTime to this array and annotates it with elementAnnotations.

Link copied to clipboard
fun TomlArrayBuilder.table(vararg elementAnnotations: Annotation, block: TomlTableBuilder.() -> Unit)
fun TomlArrayBuilder.table(elementAnnotations: List<Annotation> = emptyList(), block: TomlTableBuilder.() -> Unit)

Adds a TomlTable built with block to this array and annotates it with elementAnnotations.