Package org.python.core.stringlib
Class IntegerFormatter.Traditional
java.lang.Object
org.python.core.stringlib.InternalFormat.Formatter
org.python.core.stringlib.IntegerFormatter
org.python.core.stringlib.IntegerFormatter.Traditional
- All Implemented Interfaces:
Appendable
- Enclosing class:
- IntegerFormatter
A minor variation on
IntegerFormatter
to handle "traditional" %-formatting. The
difference is in support for spec.precision
, the formatting octal in "alternate"
mode (0 and 0123, not 0o0 and 0o123), and in c-format (in the error logic).-
Nested Class Summary
Nested classes/interfaces inherited from class org.python.core.stringlib.IntegerFormatter
IntegerFormatter.Traditional
-
Field Summary
Fields inherited from class org.python.core.stringlib.IntegerFormatter
BIN, HEX, OCT
-
Constructor Summary
ConstructorDescriptionTraditional
(StringBuilder result, InternalFormat.Spec spec) Construct the formatter from a client-supplied buffer, to which the result will be appended, and a specification.Construct the formatter from a specification, allocating a buffer internally for the result. -
Method Summary
Methods inherited from class org.python.core.stringlib.IntegerFormatter
append, append, append, bin, format, format, formatNumber
Methods inherited from class org.python.core.stringlib.InternalFormat.Formatter
alignmentNotAllowed, alternateFormNotAllowed, alternateFormNotAllowed, getPyResult, getResult, isBytes, notAllowed, notAllowed, pad, precisionNotAllowed, precisionTooLarge, setBytes, setStart, signNotAllowed, toString, unknownFormat, zeroPaddingNotAllowed
-
Constructor Details
-
Traditional
Construct the formatter from a client-supplied buffer, to which the result will be appended, and a specification. SetsInternalFormat.Formatter.mark
to the end of the buffer.- Parameters:
result
- destination bufferspec
- parsed conversion specification
-
Traditional
Construct the formatter from a specification, allocating a buffer internally for the result.- Parameters:
spec
- parsed conversion specification
-