tuweni / org.apache.tuweni.toml / TomlTable / getString

getString

@Nullable open fun getString(dottedKey: String!): String? (source)

Get a string from the TOML document.

Parameters

dottedKey - String!: A dotted key (e.g. "server.address.hostname").

Exceptions

IllegalArgumentException - If the key cannot be parsed.

TomlInvalidTypeException - If the value is present but not a string, or any element of the path preceding the final key is not a table.

Return
String?: The value, or null if no value was set in the TOML document.

@Nullable open fun getString(path: MutableList<String!>!): String? (source)

Get a string from the TOML document.

Parameters

path - MutableList<String!>!: A dotted key (e.g. "server.address.hostname").

Exceptions

TomlInvalidTypeException - If the value is present but not a string, or any element of the path preceding the final key is not a table.

Return
String?: The value, or null if no value was set in the TOML document.

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

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

Parameters

dottedKey - String!: A dotted key (e.g. "server.address.hostname").

defaultValue - Supplier<String!>!: A supplier for the default value.

Exceptions

IllegalArgumentException - If the key cannot be parsed.

TomlInvalidTypeException - If the value is present but not a string, or any element of the path preceding the final key is not a table.

Return
String!: The value, or the default.

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

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

Parameters

path - MutableList<String!>!: The key path.

defaultValue - Supplier<String!>!: A supplier for the default value.

Exceptions

TomlInvalidTypeException - If the value is present but not a string, or any element of the path preceding the final key is not a table.

Return
String!: The value, or the default.