Class FormattableFlags

java.lang.Object
java.util.FormattableFlags

public final class FormattableFlags extends Object
FormattableFlags are passed to the Formattable.formatTo() method and modify the output format for Formattables. Implementations of Formattable are responsible for interpreting and validating any flags.
Since:
1.5
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Requires the output to use an alternate form.
    static final int
    Left-justifies the output.
    static final int
    Converts the output to upper case according to the rules of the locale given during creation of the formatter argument of the formatTo() method.
  • Method Summary

    Methods declared in class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    Modifier and Type
    Method
    Description
    protected Object
    Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.
    boolean
    Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    May cause performance issues, deadlocks and hangs.
    final Class<? extends Object>
    Answers the unique instance of java.lang.Class which represents the class of the receiver.
    int
    Answers an integer hash code for the receiver.
    final void
    Causes one thread which is waiting on the receiver to be made ready to run.
    final void
    Causes all threads which are waiting on the receiver to be made ready to run.
    Answers a string containing a concise, human-readable description of the receiver.
    final void
    Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated by notify or notifyAll).
    final void
    wait(long time)
    Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated by notify or notifyAll) or the expiration of the timeout.
    final void
    wait(long time, int frac)
    Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated by notify or notifyAll) or the expiration of the timeout.
  • Field Details

    • 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:
    • UPPERCASE

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

      This flag corresponds to 'S' ('\u0053') in the format specifier.

      See Also:
    • 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: