ReducedPrinterParser

Prints and parses a reduced numeric date-time field.

Constructors

this
this(TemporalField field, int minWidth, int maxWidth, int baseValue, ChronoLocalDate baseDate)

Constructor.

this
this(TemporalField field, int minWidth, int maxWidth, int baseValue, ChronoLocalDate baseDate, int subsequentWidth)

Constructor. The arguments have already been checked.

Members

Functions

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

For a ReducedPrinterParser, fixed width is false if the mode is strict, otherwise it is set as for NumberPrinterParser. @param context the context @return if the field is fixed width @see DateTimeFormatterBuilder#appendValueReduced(hunt.time.temporal.TemporalField, int, int, int)

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

Returns a new instance with fixed width flag set.

withSubsequentWidth
ReducedPrinterParser withSubsequentWidth(int subsequentWidth)

Returns a new instance with an updated subsequent width.

Inherited Members

From NumberPrinterParser

EXCEED_POINTS
enum long[] EXCEED_POINTS;

Array of 10 to the power of n.

field
TemporalField field;
Undocumented in source.
minWidth
int minWidth;
Undocumented in source.
maxWidth
int maxWidth;
Undocumented in source.
signStyle
SignStyle signStyle;
Undocumented in source.
subsequentWidth
int subsequentWidth;
Undocumented in source.
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.

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.

Meta