Format Options
A structured representation of formatting options compatible with printf style formatting.
This class is immutable and thread safe.
See also
<a href="https://github. com/google/flogger/blob/cb9e836a897d36a78309ee8badf5cad4e6a2d3d8/api/src/main/java/com/google/common/flogger/backend/Format Options. java">
Original Java code of Google Flogger
Properties
Link copied to clipboard
A formatting flag which specifies that output should be left-aligned within the minimum available width.
Link copied to clipboard
A formatting flag which specifies that for signed numeric output, positive values should be prefixed with an ASCII plus (
'+').Link copied to clipboard
A formatting flag which specifies that for signed numeric output, positive values should be prefixed with an ASCII space (
' ').Link copied to clipboard
A formatting flag which specifies that output should be shown in a type dependent alternate form.
Link copied to clipboard
A formatting flag which specifies that for non-exponential, base-10, numeric output a grouping separator (often a ',') should be used.
Link copied to clipboard
A formatting flag which specifies that numeric output should be padding with leading zeros as necessary to fill the minimum width.
Link copied to clipboard
A formatting flag which specifies that output should be upper-cased after all other formatting.
Link copied to clipboard
A formatting flag which specifies that for signed numeric output, negative values should be surrounded by parentheses.
Functions
Link copied to clipboard
Appends the data for this options instance in a printf compatible form to the given buffer.
Link copied to clipboard
Validates these options as if they were being applied to the given FormatChar and checks for inconsistencies in flag values.
Link copied to clipboard
Returns a possibly new FormatOptions instance possibly containing a subset of the formatting information.
Link copied to clipboard
Returns the default options singleton instance.
Link copied to clipboard
Returns the precision for these options, or UNSET if not specified.
Link copied to clipboard
Creates a options instance with the given values.
Link copied to clipboard
Parses a sub-sequence of a log message to extract and return its options.
Link copied to clipboard
Corresponds to printf flag '-' (incompatible with '0').
Link copied to clipboard
Corresponds to printf flag '+'.
Link copied to clipboard
Corresponds to printf flag ' '.
Link copied to clipboard
Corresponds to printf flag '#'.
Link copied to clipboard
Corresponds to printf flag ','.
Link copied to clipboard
Corresponds to printf flag '0'.
Link copied to clipboard
Corresponds to formatting with an upper-case format character.