Class FormattableFlags
java.lang.Object
java.util.FormattableFlags
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
FieldsModifier and TypeFieldDescriptionstatic final intRequires the output to use an alternate form.static final intLeft-justifies the output.static final intConverts the output to upper case according to the rules of the locale given during creation of theformatterargument of theformatTo()method. -
Method Summary
Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()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.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.toString()Answers a string containing a concise, human-readable description of the receiver.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(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 bynotifyornotifyAll) or the expiration of the timeout.final voidwait(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 bynotifyornotifyAll) or the expiration of the timeout.
-
Field Details
-
LEFT_JUSTIFY
public static final int LEFT_JUSTIFYLeft-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 UPPERCASEConverts the output to upper case according to the rules of the locale given during creation of theformatterargument of theformatTo()method. The output should be equivalent the following invocation ofString.toUpperCase(java.util.Locale)out.toUpperCase()This flag corresponds to
'S'('\u0053') in the format specifier.- See Also:
-
ALTERNATE
public static final int ALTERNATERequires the output to use an alternate form. The definition of the form is specified by theFormattable.This flag corresponds to
'#'('\u0023') in the format specifier.- See Also:
-