Package org.wildfly.common.format
Class Printf
java.lang.Object
org.wildfly.common.format.Printf
A string formatter which can be customized.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidappendSpaces(StringBuilder target, int cnt) protected static voidappendZeros(StringBuilder target, int cnt) protected voidformatBoolean(StringBuilder target, Object item, GeneralFlags genFlags, int width, int precision) <A extends Appendable>
AformatBuffered(A destination, String format, Object... params) protected voidformatCharacter(StringBuilder target, int codePoint, GeneralFlags genFlags, int width, int precision) protected voidformatDecimalInteger(StringBuilder target, Number item, GeneralFlags genFlags, NumericFlags numFlags, int width) formatDirect(StringBuilder destination, String format, Object... params) protected voidformatFloatingPointDecimal(StringBuilder target, Number item, GeneralFlags genFlags, NumericFlags numFlags, int width, int precision) protected voidformatFloatingPointGeneral(StringBuilder target, Number item, GeneralFlags genFlags, NumericFlags numFlags, int width, int precision) protected voidformatFloatingPointSci(StringBuilder target, Number item, GeneralFlags genFlags, NumericFlags numFlags, int width, int precision) protected voidformatFormattableString(StringBuilder target, Formattable formattable, GeneralFlags genFlags, int width, int precision) protected voidformatHashCode(StringBuilder target, Object item, GeneralFlags genFlags, int width, int precision) protected voidformatHexInteger(StringBuilder target, Number item, GeneralFlags genFlags, NumericFlags numFlags, int width) protected voidformatLineSeparator(StringBuilder target) protected voidformatOctalInteger(StringBuilder target, Number item, GeneralFlags genFlags, NumericFlags numFlags, int width) protected voidformatPercent(StringBuilder target) protected voidformatPlainString(StringBuilder target, Object item, GeneralFlags genFlags, int width, int precision) protected voidformatTimeField(StringBuilder target, TemporalAccessor ta, TemporalField field, GeneralFlags genFlags, int width, int zeroPad) protected voidformatTimeTextField(StringBuilder target, TemporalAccessor ta, TemporalField field, String[] symbols, GeneralFlags genFlags, int width) protected voidformatTimeZoneId(StringBuilder target, TemporalAccessor ta, GeneralFlags genFlags, int width) protected voidformatTimeZoneOffset(StringBuilder target, TemporalAccessor ta, GeneralFlags genFlags, int width) protected DateFormatSymbols
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
Printf
-
Printf
public Printf()
-
-
Method Details
-
getLocale
-
format
-
formatBuffered
public <A extends Appendable> A formatBuffered(A destination, String format, Object... params) throws IOException - Throws:
IOException
-
formatDirect
-
appendSpaces
-
appendZeros
-
getDateFormatSymbols
-
formatTimeTextField
protected void formatTimeTextField(StringBuilder target, TemporalAccessor ta, TemporalField field, String[] symbols, GeneralFlags genFlags, int width) -
formatTimeZoneId
protected void formatTimeZoneId(StringBuilder target, TemporalAccessor ta, GeneralFlags genFlags, int width) -
formatTimeZoneOffset
protected void formatTimeZoneOffset(StringBuilder target, TemporalAccessor ta, GeneralFlags genFlags, int width) -
formatTimeField
protected void formatTimeField(StringBuilder target, TemporalAccessor ta, TemporalField field, GeneralFlags genFlags, int width, int zeroPad) -
formatPercent
-
formatLineSeparator
-
formatFormattableString
protected void formatFormattableString(StringBuilder target, Formattable formattable, GeneralFlags genFlags, int width, int precision) -
formatPlainString
protected void formatPlainString(StringBuilder target, Object item, GeneralFlags genFlags, int width, int precision) -
formatBoolean
protected void formatBoolean(StringBuilder target, Object item, GeneralFlags genFlags, int width, int precision) -
formatHashCode
protected void formatHashCode(StringBuilder target, Object item, GeneralFlags genFlags, int width, int precision) -
formatCharacter
protected void formatCharacter(StringBuilder target, int codePoint, GeneralFlags genFlags, int width, int precision) -
formatDecimalInteger
protected void formatDecimalInteger(StringBuilder target, Number item, GeneralFlags genFlags, NumericFlags numFlags, int width) -
formatOctalInteger
protected void formatOctalInteger(StringBuilder target, Number item, GeneralFlags genFlags, NumericFlags numFlags, int width) -
formatHexInteger
protected void formatHexInteger(StringBuilder target, Number item, GeneralFlags genFlags, NumericFlags numFlags, int width) -
formatFloatingPointSci
protected void formatFloatingPointSci(StringBuilder target, Number item, GeneralFlags genFlags, NumericFlags numFlags, int width, int precision) -
formatFloatingPointDecimal
protected void formatFloatingPointDecimal(StringBuilder target, Number item, GeneralFlags genFlags, NumericFlags numFlags, int width, int precision) -
formatFloatingPointGeneral
protected void formatFloatingPointGeneral(StringBuilder target, Number item, GeneralFlags genFlags, NumericFlags numFlags, int width, int precision)
-