Package org.tomlj
Enum Class TomlWriteOptions.Keep
- All Implemented Interfaces:
Serializable,Comparable<TomlWriteOptions.Keep>,Constable
- Enclosing class:
TomlWriteOptions
How much of the existing document structure and format is kept.
Each value keeps less than the one before it, and where a value has nothing to keep, the next value applies. Where
an amount is set on a single table or array through MutableTomlTable.reformat(Keep) as well as in the
options, the table or array keeps the later of the two in this order.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionKeep the layout of a parsed document: every line, header and comment the parser accepted is written back as it was read, with its spacing, indentation and blank lines, and only what the editing API changed is written anew.Keep the notation of a parsed document: the form each key, value and table was written in, whether0x10or16, a bare or quoted key, a basic or literal string, a header, dotted keys or an inline table.Keep nothing: everything is written in the default style. -
Method Summary
Modifier and TypeMethodDescriptionstatic TomlWriteOptions.KeepReturns the enum constant of this class with the specified name.static TomlWriteOptions.Keep[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LAYOUT
Keep the layout of a parsed document: every line, header and comment the parser accepted is written back as it was read, with its spacing, indentation and blank lines, and only what the editing API changed is written anew.Anything with no layout to keep - a line written anew, a table built with the editing API, a document parsed with
TomlParseOptions.withoutSource(), a table of a parse result rather than the result itself - is written asNOTATIONwrites it. -
NOTATION
Keep the notation of a parsed document: the form each key, value and table was written in, whether0x10or16, a bare or quoted key, a basic or literal string, a header, dotted keys or an inline table. The order of its lines and sections and its comments are kept too, while whitespace, indentation, blank lines and the layout of arrays and inline tables come from the options.Anything with no notation to keep, such as a document parsed without its source, is written as
NOTHINGwrites it. -
NOTHING
Keep nothing: everything is written in the default style.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-