tuweni / org.apache.tuweni.toml / TomlTable

TomlTable

interface TomlTable (source)

An interface for accessing data stored in Tom's Obvious, Minimal Language (TOML).

Functions

contains

Check if a key was set in the TOML document.

open fun contains(dottedKey: String!): Boolean
open fun contains(path: MutableList<String!>!): Boolean

dottedKeySet

Get all the dotted keys of this table.

open fun dottedKeySet(): MutableSet<String!>!

Get all the dotted keys of this table.

open fun dottedKeySet(includeTables: Boolean): MutableSet<String!>!

get

Get a value from the TOML document.

open fun get(dottedKey: String!): Any?
abstract fun get(path: MutableList<String!>!): Any?

getArray

Get an array from the TOML document.

open fun getArray(dottedKey: String!): TomlArray?
open fun getArray(path: MutableList<String!>!): TomlArray?

getArrayOrEmpty

Get an array from the TOML document.

open fun getArrayOrEmpty(dottedKey: String!): TomlArray!
open fun getArrayOrEmpty(path: MutableList<String!>!): TomlArray!

getBoolean

Get a boolean from the TOML document.

open fun getBoolean(dottedKey: String!): Boolean?
open fun getBoolean(path: MutableList<String!>!): Boolean?

Get a boolean from the TOML document, or return a default.

open fun getBoolean(dottedKey: String!, defaultValue: BooleanSupplier!): Boolean
open fun getBoolean(path: MutableList<String!>!, defaultValue: BooleanSupplier!): Boolean

getDouble

Get a double from the TOML document.

open fun getDouble(dottedKey: String!): Double?
open fun getDouble(path: MutableList<String!>!): Double?

Get a double from the TOML document, or return a default.

open fun getDouble(dottedKey: String!, defaultValue: DoubleSupplier!): Double
open fun getDouble(path: MutableList<String!>!, defaultValue: DoubleSupplier!): Double

getLocalDate

Get a local date from the TOML document.

open fun getLocalDate(dottedKey: String!): LocalDate?
open fun getLocalDate(path: MutableList<String!>!): LocalDate?

Get a local date from the TOML document, or return a default.

open fun getLocalDate(dottedKey: String!, defaultValue: Supplier<LocalDate!>!): LocalDate!
open fun getLocalDate(path: MutableList<String!>!, defaultValue: Supplier<LocalDate!>!): LocalDate!

getLocalDateTime

Get a local date time from the TOML document.

open fun getLocalDateTime(dottedKey: String!): LocalDateTime?
open fun getLocalDateTime(path: MutableList<String!>!): LocalDateTime?

Get a local date time from the TOML document, or return a default.

open fun getLocalDateTime(dottedKey: String!, defaultValue: Supplier<LocalDateTime!>!): LocalDateTime!
open fun getLocalDateTime(path: MutableList<String!>!, defaultValue: Supplier<LocalDateTime!>!): LocalDateTime!

getLocalTime

Get a local time from the TOML document.

open fun getLocalTime(dottedKey: String!): LocalTime?
open fun getLocalTime(path: MutableList<String!>!): LocalTime?

Get a local time from the TOML document, or return a default.

open fun getLocalTime(dottedKey: String!, defaultValue: Supplier<LocalTime!>!): LocalTime!
open fun getLocalTime(path: MutableList<String!>!, defaultValue: Supplier<LocalTime!>!): LocalTime!

getLong

Get a long from the TOML document.

open fun getLong(dottedKey: String!): Long?
open fun getLong(path: MutableList<String!>!): Long?

Get a long from the TOML document, or return a default.

open fun getLong(dottedKey: String!, defaultValue: LongSupplier!): Long
open fun getLong(path: MutableList<String!>!, defaultValue: LongSupplier!): Long

getOffsetDateTime

Get an offset date time from the TOML document.

open fun getOffsetDateTime(dottedKey: String!): OffsetDateTime?
open fun getOffsetDateTime(path: MutableList<String!>!): OffsetDateTime?

Get an offset date time from the TOML document, or return a default.

open fun getOffsetDateTime(dottedKey: String!, defaultValue: Supplier<OffsetDateTime!>!): OffsetDateTime!
open fun getOffsetDateTime(path: MutableList<String!>!, defaultValue: Supplier<OffsetDateTime!>!): OffsetDateTime!

getString

Get a string from the TOML document.

open fun getString(dottedKey: String!): String?
open fun getString(path: MutableList<String!>!): String?

Get a string from the TOML document, or return a default.

open fun getString(dottedKey: String!, defaultValue: Supplier<String!>!): String!
open fun getString(path: MutableList<String!>!, defaultValue: Supplier<String!>!): String!

getTable

Get a table from the TOML document.

open fun getTable(dottedKey: String!): TomlTable?
open fun getTable(path: MutableList<String!>!): TomlTable?

getTableOrEmpty

Get a table from the TOML document.

open fun getTableOrEmpty(dottedKey: String!): TomlTable!
open fun getTableOrEmpty(path: MutableList<String!>!): TomlTable!

inputPositionOf

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

open fun inputPositionOf(dottedKey: String!): TomlPosition?
abstract fun inputPositionOf(path: MutableList<String!>!): TomlPosition?

isArray

Check if a value in the TOML document is an array.

open fun isArray(dottedKey: String!): Boolean
open fun isArray(path: MutableList<String!>!): Boolean

isBoolean

Check if a value in the TOML document is a boolean.

open fun isBoolean(dottedKey: String!): Boolean
open fun isBoolean(path: MutableList<String!>!): Boolean

isDouble

Check if a value in the TOML document is a double.

open fun isDouble(dottedKey: String!): Boolean
open fun isDouble(path: MutableList<String!>!): Boolean

isEmpty

Returns true if there are no entries in this table

abstract fun isEmpty(): Boolean

isLocalDate

Check if a value in the TOML document is a LocalDate.

open fun isLocalDate(dottedKey: String!): Boolean
open fun isLocalDate(path: MutableList<String!>!): Boolean

isLocalDateTime

Check if a value in the TOML document is a LocalDateTime.

open fun isLocalDateTime(dottedKey: String!): Boolean
open fun isLocalDateTime(path: MutableList<String!>!): Boolean

isLocalTime

Check if a value in the TOML document is a LocalTime.

open fun isLocalTime(dottedKey: String!): Boolean
open fun isLocalTime(path: MutableList<String!>!): Boolean

isLong

Check if a value in the TOML document is a long.

open fun isLong(dottedKey: String!): Boolean
open fun isLong(path: MutableList<String!>!): Boolean

isOffsetDateTime

Check if a value in the TOML document is an OffsetDateTime.

open fun isOffsetDateTime(dottedKey: String!): Boolean
open fun isOffsetDateTime(path: MutableList<String!>!): Boolean

isString

Check if a value in the TOML document is a string.

open fun isString(dottedKey: String!): Boolean
open fun isString(path: MutableList<String!>!): Boolean

isTable

Check if a value in the TOML document is a table.

open fun isTable(dottedKey: String!): Boolean
open fun isTable(path: MutableList<String!>!): Boolean

keyPathSet

Get all the paths in this table.

open fun keyPathSet(): MutableSet<MutableList<String!>!>!

Get all the paths in this table.

abstract fun keyPathSet(includeTables: Boolean): MutableSet<MutableList<String!>!>!

keySet

Get the keys of this table.

abstract fun keySet(): MutableSet<String!>!

size

Provides the size of the table

abstract fun size(): Int

toJson

Return a representation of this table using JSON.

open fun toJson(): String!

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

open fun toJson(appendable: Appendable!): Unit

toMap

Get the elements of this array as a Map.

abstract fun toMap(): MutableMap<String!, Any!>!

Inheritors

TomlParseResult

The result from parsing a TOML document.

interface TomlParseResult : TomlTable