java.util
Class FormattableFlags

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.util.FormattableFlags

public class FormattableFlags
extends Object sample code for java.lang.Object definition code for java.lang.Object

FomattableFlags are passed to the Formattable.formatTo() sample code for java.util.Formattable.formatTo(java.util.Formatter, int, int, int) definition code for java.util.Formattable.formatTo(java.util.Formatter, int, int, int) method and modify the output format for Formattables sample code for java.util.Formattable definition code for java.util.Formattable . Implementations of Formattable sample code for java.util.Formattable definition code for java.util.Formattable are responsible for interpreting and validating any flags.

Since:
1.5

Field Summary
static int ALTERNATE sample code for java.util.FormattableFlags.ALTERNATE definition code for java.util.FormattableFlags.ALTERNATE
          Requires the output to use an alternate form.
static int LEFT_JUSTIFY sample code for java.util.FormattableFlags.LEFT_JUSTIFY definition code for java.util.FormattableFlags.LEFT_JUSTIFY
          Left-justifies the output.
static int UPPERCASE sample code for java.util.FormattableFlags.UPPERCASE definition code for java.util.FormattableFlags.UPPERCASE
          Converts the output to upper case according to the rules of the locale sample code for java.util.Locale definition code for java.util.Locale given during creation of the formatter argument of the formatTo() sample code for java.util.Formattable.formatTo(java.util.Formatter, int, int, int) definition code for java.util.Formattable.formatTo(java.util.Formatter, int, int, int) method.
 
Method Summary
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

LEFT_JUSTIFY sample code for java.util.FormattableFlags.LEFT_JUSTIFY

public static final int LEFT_JUSTIFY
Left-justifies the output. Spaces ('\u0020') will be added at the end of the converted value as required to fill the minimum width of the field. If this flag is not set then the output will be right-justified.

This flag corresponds to '-' ('\u002d') in the format specifier.

See Also:
Constant Field Values

UPPERCASE sample code for java.util.FormattableFlags.UPPERCASE

public static final int UPPERCASE
Converts the output to upper case according to the rules of the locale sample code for java.util.Locale definition code for java.util.Locale given during creation of the formatter argument of the formatTo() sample code for java.util.Formattable.formatTo(java.util.Formatter, int, int, int) definition code for java.util.Formattable.formatTo(java.util.Formatter, int, int, int) method. The output should be equivalent the following invocation of String.toUpperCase(java.util.Locale) sample code for java.lang.String.toUpperCase(java.util.Locale) definition code for java.lang.String.toUpperCase(java.util.Locale)
     out.toUpperCase() 

This flag corresponds to '^' ('\u005e') in the format specifier.

See Also:
Constant Field Values

ALTERNATE sample code for java.util.FormattableFlags.ALTERNATE

public static final int ALTERNATE
Requires the output to use an alternate form. The definition of the form is specified by the Formattable.

This flag corresponds to '#' ('\u0023') in the format specifier.

See Also:
Constant Field Values