Interface JTomlOption<T>

All Known Subinterfaces:
JTomlOption.Bool

@NonExtendable public interface JTomlOption<T>
An enum-like option key for JToml
  • Field Details

    • INDENTATION

      static final JTomlOption<IndentationPolicy> INDENTATION
      Indentation to apply when writing
    • SPACING

      static final JTomlOption<SpacingPolicy> SPACING
      Spacing to apply when writing
    • PADDING

      static final JTomlOption<PaddingPolicy> PADDING
      Padding to apply when writing
    • TIME_ZONE

      static final JTomlOption<ZoneOffset> TIME_ZONE
      Zone offset to use when reading a Local Date-Time as an OffsetDateTime and when writing a LocalDateTime as an Offset Date-Time
    • READ_BOM

      static final JTomlOption<OrderMarkPolicy> READ_BOM
      Determines if a BOM should be read. Per RFC 3629:
       A protocol SHOULD forbid use of U+FEFF as a signature for those
       textual protocol elements that the protocol mandates to be always
       UTF-8, the signature function being totally useless in those
       cases.
       
      Hence, the default is NEVER.
    • WRITE_BOM

      static final JTomlOption<OrderMarkPolicy> WRITE_BOM
      Determines if a BOM should be written
    • LINE_SEPARATOR

      static final JTomlOption<LineSeparator> LINE_SEPARATOR
      The line separator to use when writing and normalizing, either LF or CRLF. Default is determined by System.lineSeparator(). Both line endings can always be read, irrespective of the value of this option.
    • EXTENSION_GUARD

      static final JTomlOption.Bool EXTENSION_GUARD
      If true, static extension is prohibited. This is required for the parser to be fully TOML-compliant.
    • WRITE_EMPTY_TABLES

      @AvailableSince("0.2.3") static final JTomlOption.Bool WRITE_EMPTY_TABLES
      If true, table headers will be written even if they do not contain any key-values or comments.
    • READ_COMMENTS

      @AvailableSince("0.6.0") static final JTomlOption.Bool READ_COMMENTS
      If true, comments will be stored in the resulting document (rather than ignored) when reading
    • WRITE_COMMENTS

      @AvailableSince("0.6.0") static final JTomlOption.Bool WRITE_COMMENTS
      If true, comments defined on values will be written.
    • ARRAY_STRATEGY

      @AvailableSince("0.6.0") static final JTomlOption<ArrayStrategy> ARRAY_STRATEGY
      Determines how non-table arrays should be written; specifically when elements should receive a newline
    • SORTING

      @AvailableSince("1.3.0") static final JTomlOption<SortMethod> SORTING
      Determines how keys are sorted within a table when writing.
  • Method Details

    • values

      @Contract("-> new") @NotNull static @NotNull JTomlOption<?> @NotNull [] values()
      Returns a new array containing all options. The array is sorted from least to greatest ordinal, just as in Class.getEnumConstants()
    • ordinal

      @Internal int ordinal()
    • name

      @NotNull @NotNull String name()
    • valueClass

      @NotNull @NotNull Class<T> valueClass()
    • defaultValue

      @NotNull T defaultValue()
    • isLegal

      default boolean isLegal(@NotNull T value)