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:
java.lang.Appendable
- Enclosing class:
- IntegerFormatter
public static class IntegerFormatter.Traditional extends IntegerFormatter
A minor variation onIntegerFormatter
to handle "traditional" %-formatting. The difference is in support forspec.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
Constructors Constructor Description Traditional(java.lang.StringBuilder result, InternalFormat.Spec spec)
Construct the formatter from a client-supplied buffer, to which the result will be appended, and a specification.Traditional(InternalFormat.Spec spec)
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 Detail
-
Traditional
public Traditional(java.lang.StringBuilder result, InternalFormat.Spec spec)
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
public Traditional(InternalFormat.Spec spec)
Construct the formatter from a specification, allocating a buffer internally for the result.- Parameters:
spec
- parsed conversion specification
-
-