Modifier and Type | Class and Description |
---|---|
static class |
FormatterConfig.DefaultDateFormat
Formats with milliseconds since epoch
|
Constructor and Description |
---|
FormatterConfig() |
FormatterConfig(FormatterConfig other)
Copies most fields, but still points to other.dateFormatSupplier.
|
Modifier and Type | Method and Description |
---|---|
FormatterConfig |
doNotLimitShowLength() |
com.google.common.base.Supplier<DateFormat> |
getDateFormatSupplier() |
int |
getShownLength() |
FormatterConfig |
setDateFormatSupplier(com.google.common.base.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 . |
FormatterConfig |
setPrintTimestamps(boolean printTimestamps) |
FormatterConfig |
setShownLength(int shownLength)
If given a negative number, throws an
IllegalArgumentException |
boolean |
willLimitShowLength() |
boolean |
willPrintTimestamps() |
public FormatterConfig()
public FormatterConfig(FormatterConfig other)
public boolean willPrintTimestamps()
public FormatterConfig setPrintTimestamps(boolean printTimestamps)
public int getShownLength()
public boolean willLimitShowLength()
public FormatterConfig setShownLength(int shownLength)
IllegalArgumentException
shownLength
- maximum length of formatted outputthis
to allow chaining of set methodspublic FormatterConfig doNotLimitShowLength()
public com.google.common.base.Supplier<DateFormat> getDateFormatSupplier()
public FormatterConfig setDateFormatSupplier(com.google.common.base.Supplier<DateFormat> dateFormatSupplier)
Supplier
when calling this function if your
Supplier
maintains some kind of state (see DateFormatSupplier
.Copyright © 2011–2016 The Apache Software Foundation. All rights reserved.