abstract static class DateTimeFormatterBuilder.NumberFormatter extends java.lang.Object implements InternalPrinter, InternalParser
| Modifier and Type | Field and Description |
|---|---|
protected DateTimeFieldType |
iFieldType |
protected int |
iMaxParsedDigits |
protected boolean |
iSigned |
| Constructor and Description |
|---|
NumberFormatter(DateTimeFieldType fieldType,
int maxParsedDigits,
boolean signed) |
| Modifier and Type | Method and Description |
|---|---|
int |
estimateParsedLength()
Returns the expected maximum number of characters consumed.
|
int |
parseInto(DateTimeParserBucket bucket,
java.lang.CharSequence text,
int position)
Parse an element from the given text, saving any fields into the given
DateTimeParserBucket.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitestimatePrintedLength, printTo, printToprotected final DateTimeFieldType iFieldType
protected final int iMaxParsedDigits
protected final boolean iSigned
NumberFormatter(DateTimeFieldType fieldType, int maxParsedDigits, boolean signed)
public int estimateParsedLength()
InternalParserestimateParsedLength in interface InternalParserpublic int parseInto(DateTimeParserBucket bucket, java.lang.CharSequence text, int position)
InternalParserIf it fails, the return value is negative. To determine the position where the parse failed, apply the one's complement operator (~) on the return value.
parseInto in interface InternalParserbucket - field are saved into this, not nulltext - the text to parse, not nullposition - position to start parsing from