NumberPrinterParser

Prints and parses a numeric date-time field with optional padding.

Constructors

this
this(TemporalField field, int minWidth, int maxWidth, SignStyle signStyle)

Constructor.

this
this(TemporalField field, int minWidth, int maxWidth, SignStyle signStyle, int subsequentWidth)

Constructor.

Members

Functions

format
bool format(DateTimePrintContext context, StringBuilder buf)
Undocumented in source. Be warned that the author may not have intended to support it.
getValue
long getValue(DateTimePrintContext context, long value)

Gets the value to output.

isFixedWidth
bool isFixedWidth(DateTimeParseContext context)

For NumberPrinterParser, the width is fixed depending on the minWidth, maxWidth, signStyle and whether subsequent fields are fixed. @param context the context @return true if the field is fixed width @see DateTimeFormatterBuilder#appendValue(hunt.time.temporal.TemporalField, int)

parse
int parse(DateTimeParseContext context, string text, int position)
Undocumented in source. Be warned that the author may not have intended to support it.
setValue
int setValue(DateTimeParseContext context, long value, int errorPos, int successPos)

Stores the value.

toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
withFixedWidth
NumberPrinterParser withFixedWidth()

Returns a new instance with fixed width flag set.

withSubsequentWidth
NumberPrinterParser withSubsequentWidth(int subsequentWidth)

Returns a new instance with an updated subsequent width.

Variables

EXCEED_POINTS
enum long[] EXCEED_POINTS;

Array of 10 to the power of n.

field
TemporalField field;
Undocumented in source.
maxWidth
int maxWidth;
Undocumented in source.
minWidth
int minWidth;
Undocumented in source.
signStyle
SignStyle signStyle;
Undocumented in source.
subsequentWidth
int subsequentWidth;
Undocumented in source.

Inherited Members

From DateTimePrinterParser

format
bool format(DateTimePrintContext context, StringBuilder buf)

Prints the date-time object to the buffer. !(p) The context holds information to use during the format. It also contains the date-time information to be printed. !(p) The buffer must not be mutated beyond the content controlled by the implementation.

parse
int parse(DateTimeParseContext context, string text, int position)

Parses text into date-time information. !(p) The context holds information to use during the parse. It is also used to store the parsed date-time information.

toString
string toString()
Undocumented in source.

Meta