Enum Class SortMethod

java.lang.Object
java.lang.Enum<SortMethod>
io.github.wasabithumb.jtoml.option.prop.SortMethod
All Implemented Interfaces:
Serializable, Comparable<SortMethod>, Constable

@AvailableSince("1.3.0") public enum SortMethod extends Enum<SortMethod>
Determines how keys within a table are sorted when writing.
See Also:
  • Enum Constant Details

    • STRATIFIED

      public static final SortMethod 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

      public static final SortMethod 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

      public static final SortMethod 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

      public static SortMethod[] 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

      public static SortMethod valueOf(String name)
      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 name
      NullPointerException - if the argument is null