TomlTableBuilder

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

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

Constructors

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

Functions

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

Associates a TomlArray built with block with primitive key and annotates the array with elementAnnotations.

Link copied to clipboard

Creates a read-only copy based on current configuration.

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

Associates element with primitive key and annotates element with elementAnnotations.

Link copied to clipboard
fun TomlTableBuilder.element(key: Any?, element: TomlElement, vararg elementAnnotations: Annotation)

Associates element with primitive key and annotates element with elementAnnotations.

Link copied to clipboard
fun elements(elements: Map<*, TomlElement>, annotations: Map<*, List<Annotation>> = emptyMap<Any?, _>())

Adds elements and their annotations to this table.

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

Associates boolean with primitive key and annotates boolean with elementAnnotations.

fun TomlTableBuilder.literal(key: Any?, float: Double, vararg elementAnnotations: Annotation)
fun TomlTableBuilder.literal(key: Any?, float: Double, elementAnnotations: List<Annotation> = emptyList())

Associates float with primitive key and annotates float with elementAnnotations.

fun TomlTableBuilder.literal(key: Any?, integer: Long, vararg elementAnnotations: Annotation)
fun TomlTableBuilder.literal(key: Any?, integer: Long, elementAnnotations: List<Annotation> = emptyList())

Associates integer with primitive key and annotates integer with elementAnnotations.

fun TomlTableBuilder.literal(key: Any?, string: String, vararg elementAnnotations: Annotation)
fun TomlTableBuilder.literal(key: Any?, string: String, elementAnnotations: List<Annotation> = emptyList())

Associates string with primitive key and annotates string with elementAnnotations.

fun TomlTableBuilder.literal(key: Any?, localDate: NativeLocalDate, vararg elementAnnotations: Annotation)
fun TomlTableBuilder.literal(key: Any?, localDate: NativeLocalDate, elementAnnotations: List<Annotation> = emptyList())

Associates localDate with primitive key and annotates localDate with elementAnnotations.

fun TomlTableBuilder.literal(key: Any?, localDateTime: NativeLocalDateTime, vararg elementAnnotations: Annotation)
fun TomlTableBuilder.literal(key: Any?, localDateTime: NativeLocalDateTime, elementAnnotations: List<Annotation> = emptyList())

Associates localDateTime with primitive key and annotates localDateTime with elementAnnotations.

fun TomlTableBuilder.literal(key: Any?, localTime: NativeLocalTime, vararg elementAnnotations: Annotation)
fun TomlTableBuilder.literal(key: Any?, localTime: NativeLocalTime, elementAnnotations: List<Annotation> = emptyList())

Associates localTime with primitive key and annotates localTime with elementAnnotations.

fun TomlTableBuilder.literal(key: Any?, offsetDateTime: NativeOffsetDateTime, vararg elementAnnotations: Annotation)
fun TomlTableBuilder.literal(key: Any?, offsetDateTime: NativeOffsetDateTime, elementAnnotations: List<Annotation> = emptyList())

Associates offsetDateTime with primitive key and annotates offsetDateTime with elementAnnotations.

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

Associates a TomlTable built with block with primitive key and annotates the table with elementAnnotations.