Enum Class SortMethod
- All Implemented Interfaces:
Serializable,Comparable<SortMethod>,Constable
Determines how keys within a table
are sorted when writing.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionKeys are sorted by identity, resulting in a lexicographical order.Groups keys by value type: first primitives, then arrays, then arrays-of-tables, then tables.Keys are sorted by creation time. -
Method Summary
Modifier and TypeMethodDescriptionstatic SortMethodReturns the enum constant of this class with the specified name.static SortMethod[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STRATIFIED
Groups keys by value type: first primitives, then arrays, then arrays-of-tables, then tables. This ensures that arrays-of-tables and tables are never forced to use inline syntax. -
LEXICOGRAPHICAL
Keys are sorted by identity, resulting in a lexicographical order. This may force arrays-of-tables and tables to use inline syntax in order to produce valid TOML. -
TIME
Keys are sorted by creation time. This may force arrays-of-tables and tables to use inline syntax in order to produce valid TOML.
-
-
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
-