Package org.apache.commons.lang3.text
Class FormattableUtils
- java.lang.Object
 - 
- org.apache.commons.lang3.text.FormattableUtils
 
 
- 
@Deprecated public class FormattableUtils extends java.lang.ObjectDeprecated.As of 3.6, use Apache Commons Text FormattableUtils insteadProvides utilities for working with theFormattableinterface.The
Formattableinterface provides basic control over formatting when using aFormatter. It is primarily concerned with numeric precision and padding, and is not designed to allow generalised alternate formats.- Since:
 - 3.0
 
 
- 
- 
Constructor Summary
Constructors Constructor Description FormattableUtils()Deprecated.FormattableUtilsinstances should NOT be constructed in standard programming. 
- 
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.util.Formatterappend(java.lang.CharSequence seq, java.util.Formatter formatter, int flags, int width, int precision)Deprecated.Handles the commonFormattableoperations of truncate-pad-append, with no ellipsis on precision overflow, and padding width underflow with spaces.static java.util.Formatterappend(java.lang.CharSequence seq, java.util.Formatter formatter, int flags, int width, int precision, char padChar)Deprecated.Handles the commonFormattableoperations of truncate-pad-append, with no ellipsis on precision overflow.static java.util.Formatterappend(java.lang.CharSequence seq, java.util.Formatter formatter, int flags, int width, int precision, char padChar, java.lang.CharSequence ellipsis)Deprecated.Handles the commonFormattableoperations of truncate-pad-append.static java.util.Formatterappend(java.lang.CharSequence seq, java.util.Formatter formatter, int flags, int width, int precision, java.lang.CharSequence ellipsis)Deprecated.Handles the commonFormattableoperations of truncate-pad-append, padding width underflow with spaces.static java.lang.StringtoString(java.util.Formattable formattable)Deprecated.Gets the default formatted representation of the specifiedFormattable. 
 - 
 
- 
- 
Constructor Detail
- 
FormattableUtils
public FormattableUtils()
Deprecated.FormattableUtilsinstances should NOT be constructed in standard programming. Instead, the methods of the class should be invoked statically.This constructor is public to permit tools that require a JavaBean instance to operate.
 
 - 
 
- 
Method Detail
- 
append
public static java.util.Formatter append(java.lang.CharSequence seq, java.util.Formatter formatter, int flags, int width, int precision)Deprecated.Handles the commonFormattableoperations of truncate-pad-append, with no ellipsis on precision overflow, and padding width underflow with spaces.- Parameters:
 seq- the string to handle, not nullformatter- the destination formatter, not nullflags- the flags for formatting, seeFormattablewidth- the width of the output, seeFormattableprecision- the precision of the output, seeFormattable- Returns:
 - the 
formatterinstance, not null 
 
- 
append
public static java.util.Formatter append(java.lang.CharSequence seq, java.util.Formatter formatter, int flags, int width, int precision, char padChar)Deprecated.Handles the commonFormattableoperations of truncate-pad-append, with no ellipsis on precision overflow.- Parameters:
 seq- the string to handle, not nullformatter- the destination formatter, not nullflags- the flags for formatting, seeFormattablewidth- the width of the output, seeFormattableprecision- the precision of the output, seeFormattablepadChar- the pad character to use- Returns:
 - the 
formatterinstance, not null 
 
- 
append
public static java.util.Formatter append(java.lang.CharSequence seq, java.util.Formatter formatter, int flags, int width, int precision, char padChar, java.lang.CharSequence ellipsis)Deprecated.Handles the commonFormattableoperations of truncate-pad-append.- Parameters:
 seq- the string to handle, not nullformatter- the destination formatter, not nullflags- the flags for formatting, seeFormattablewidth- the width of the output, seeFormattableprecision- the precision of the output, seeFormattablepadChar- the pad character to useellipsis- the ellipsis to use when precision dictates truncation, null or empty causes a hard truncation- Returns:
 - the 
formatterinstance, not null 
 
- 
append
public static java.util.Formatter append(java.lang.CharSequence seq, java.util.Formatter formatter, int flags, int width, int precision, java.lang.CharSequence ellipsis)Deprecated.Handles the commonFormattableoperations of truncate-pad-append, padding width underflow with spaces.- Parameters:
 seq- the string to handle, not nullformatter- the destination formatter, not nullflags- the flags for formatting, seeFormattablewidth- the width of the output, seeFormattableprecision- the precision of the output, seeFormattableellipsis- the ellipsis to use when precision dictates truncation, null or empty causes a hard truncation- Returns:
 - the 
formatterinstance, not null 
 
- 
toString
public static java.lang.String toString(java.util.Formattable formattable)
Deprecated.Gets the default formatted representation of the specifiedFormattable.- Parameters:
 formattable- the instance to convert to a string, not null- Returns:
 - the resulting string, not null
 
 
 - 
 
 -