Formattable interface.
The Formattable interface provides basic control over formatting when using a Formatter. It is primarily concerned with numeric precision and
padding, and is not designed to allow generalized alternate formats.
| Modifier and Type | Field and Description |
|---|---|
| private static final String | SIMPLEST_FORMAT
A format that simply outputs the value as a string. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static Formatter | Returns: Theformatter instance, not null.the string to handle, not null. seq, final Formatter the destination formatter, not null. formatter, final int the flags for formatting, see flags, final int Formattable.the width of the output, see width, final int Formattable.the precision of the output, see precision)Formattable.Handles the common |
| public static Formatter | Returns: Theformatter instance, not null.the string to handle, not null. seq, final Formatter the destination formatter, not null. formatter, final int the flags for formatting, see flags, final int Formattable.the width of the output, see width, final int Formattable.the precision of the output, see precision, final char Formattable.the pad character to use. padChar)Handles the common |
| public static Formatter | Returns: Theformatter instance, not null.the string to handle, not null. seq, final Formatter the destination formatter, not null. formatter, final int the flags for formatting, see flags, final int Formattable.the width of the output, see width, final int Formattable.the precision of the output, see precision, final char Formattable.the pad character to use. padChar, final CharSequence the ellipsis to use when precision dictates truncation, null or empty causes a hard truncation. truncateEllipsis)Handles the common |
| public static Formatter | Returns: Theformatter instance, not nullthe string to handle, not null. seq, final Formatter the destination formatter, not null. formatter, final int the flags for formatting, see flags, final int Formattable.the width of the output, see width, final int Formattable.the precision of the output, see precision, final CharSequence Formattable.the ellipsis to use when precision dictates truncation, null or empty causes a hard truncation.. ellipsis)Handles the common |
| public static String | Returns: The resulting string, not null.the instance to convert to a string, not null. formattable)Gets the default formatted representation of the specified |
| SIMPLEST_FORMAT | back to summary |
|---|---|
| private static final String SIMPLEST_FORMAT A format that simply outputs the value as a string. | |
| FormattableUtils | back to summary |
|---|---|
| public FormattableUtils()
This constructor is public to permit tools that require a JavaBean instance to operate. | |
| append | back to summary |
|---|---|
| public static Formatter append(final CharSequence seq, final Formatter formatter, final int flags, final int width, final int precision) Handles the common
| |
| append | back to summary |
|---|---|
| public static Formatter append(final CharSequence seq, final Formatter formatter, final int flags, final int width, final int precision, final char padChar) Handles the common
| |
| append | back to summary |
|---|---|
| public static Formatter append(final CharSequence seq, final Formatter formatter, final int flags, final int width, final int precision, final char padChar, final CharSequence truncateEllipsis) Handles the common
| |
| append | back to summary |
|---|---|
| public static Formatter append(final CharSequence seq, final Formatter formatter, final int flags, final int width, final int precision, final CharSequence ellipsis) Handles the common
| |
| toString | back to summary |
|---|---|
| public static String toString(final Formattable formattable) Gets the default formatted representation of the specified
| |