public class IntegerFormatter extends InternalFormat.Formatter
| Modifier and Type | Class and Description | 
|---|---|
| static class  | IntegerFormatter.TraditionalA minor variation on  IntegerFormatterto handle "traditional" %-formatting. | 
| Modifier and Type | Field and Description | 
|---|---|
| static InternalFormat.Spec | BINFormat specification used by bin(). | 
| static InternalFormat.Spec | HEXFormat specification used by hex(). | 
| static InternalFormat.Spec | OCTFormat specification used by oct(). | 
| Constructor and Description | 
|---|
| IntegerFormatter(InternalFormat.Spec spec)Construct the formatter from a specification, allocating a buffer internally for the result. | 
| IntegerFormatter(StringBuilder result,
                InternalFormat.Spec spec)Construct the formatter from a client-supplied buffer, to which the result will be appended,
 and a specification. | 
| Modifier and Type | Method and Description | 
|---|---|
| IntegerFormatter | append(char c) | 
| IntegerFormatter | append(CharSequence csq) | 
| IntegerFormatter | append(CharSequence csq,
      int start,
      int end) | 
| static PyString | bin(PyObject number)Convert the object to binary according to the conventions of Python built-in
  bin(). | 
| IntegerFormatter | format(BigInteger value)Format a  BigInteger, which is the implementation type of Jythonlong,
 according to the specification represented by thisIntegerFormatter. | 
| IntegerFormatter | format(int value)Format an integer according to the specification represented by this
  IntegerFormatter. | 
| static PyString | formatNumber(PyObject number,
            InternalFormat.Spec spec)Convert the object according to the conventions of Python built-in  hex(), oroct(). | 
alignmentNotAllowed, alternateFormNotAllowed, alternateFormNotAllowed, getPyResult, getResult, isBytes, notAllowed, notAllowed, pad, precisionNotAllowed, precisionTooLarge, setBytes, setStart, signNotAllowed, toString, unknownFormat, zeroPaddingNotAllowedpublic static final InternalFormat.Spec BIN
public static final InternalFormat.Spec OCT
public static final InternalFormat.Spec HEX
public IntegerFormatter(StringBuilder result, InternalFormat.Spec spec)
InternalFormat.Formatter.mark to the end of the buffer.result - destination bufferspec - parsed conversion specificationpublic IntegerFormatter(InternalFormat.Spec spec)
spec - parsed conversion specificationpublic IntegerFormatter append(char c)
append in interface Appendableappend in class InternalFormat.Formatterpublic IntegerFormatter append(CharSequence csq)
append in interface Appendableappend in class InternalFormat.Formatterpublic IntegerFormatter append(CharSequence csq, int start, int end) throws IndexOutOfBoundsException
append in interface Appendableappend in class InternalFormat.FormatterIndexOutOfBoundsExceptionpublic IntegerFormatter format(BigInteger value)
BigInteger, which is the implementation type of Jython long,
 according to the specification represented by this IntegerFormatter. The
 conversion type, and flags for grouping or base prefix are dealt with here. At the point this
 is used, we know the InternalFormat.Formatter.spec is one of the integer types.value - to convertpublic IntegerFormatter format(int value)
IntegerFormatter. The conversion type, and flags for grouping or base prefix are
 dealt with here. At the point this is used, we know the InternalFormat.Formatter.spec is one of the integer
 types.value - to convertpublic static PyString bin(PyObject number)
bin(). The object's __index__ method is called, and is responsible for raising
 the appropriate error (which the base PyObject.__index__() does).number - to convertpublic static PyString formatNumber(PyObject number, InternalFormat.Spec spec)
hex(), or
 oct(). The object's __index__ method is called, and is responsible
 for raising the appropriate error (which the base PyObject.__index__() does).number - to convert