Class FormatterConfig

  • public class FormatterConfig
    extends Object
    Holds configuration settings for a Formatter
    • Constructor Detail

      • FormatterConfig

        public FormatterConfig()
      • FormatterConfig

        public FormatterConfig​(FormatterConfig other)
        Copies most fields, but still points to other.dateFormatSupplier.
    • Method Detail

      • willPrintTimestamps

        public boolean willPrintTimestamps()
      • setPrintTimestamps

        public FormatterConfig setPrintTimestamps​(boolean printTimestamps)
      • getShownLength

        public int getShownLength()
      • willLimitShowLength

        public boolean willLimitShowLength()
      • setShownLength

        public FormatterConfig setShownLength​(int shownLength)
        If given a negative number, throws an IllegalArgumentException
        shownLength - maximum length of formatted output
        this to allow chaining of set methods
      • setDateFormatSupplier

        public FormatterConfig setDateFormatSupplier​(Supplier<DateFormat> dateFormatSupplier)
        this.dateFormatSupplier points to dateFormatSupplier, so it is recommended that you create a new Supplier when calling this function if your Supplier maintains some kind of state (see DateFormatSupplier.