Package org.joda.time.format
Class DateTimeFormatterBuilder.FixedNumber
java.lang.Object
org.joda.time.format.DateTimeFormatterBuilder.NumberFormatter
org.joda.time.format.DateTimeFormatterBuilder.PaddedNumber
org.joda.time.format.DateTimeFormatterBuilder.FixedNumber
- All Implemented Interfaces:
InternalParser,InternalPrinter
- Enclosing class:
DateTimeFormatterBuilder
-
Field Summary
Fields inherited from class org.joda.time.format.DateTimeFormatterBuilder.PaddedNumber
iMinPrintedDigitsFields inherited from class org.joda.time.format.DateTimeFormatterBuilder.NumberFormatter
iFieldType, iMaxParsedDigits, iSigned -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFixedNumber(DateTimeFieldType fieldType, int numDigits, boolean signed) -
Method Summary
Modifier and TypeMethodDescriptionintparseInto(DateTimeParserBucket bucket, CharSequence text, int position) Parse an element from the given text, saving any fields into the given DateTimeParserBucket.Methods inherited from class org.joda.time.format.DateTimeFormatterBuilder.PaddedNumber
estimatePrintedLength, printTo, printToMethods inherited from class org.joda.time.format.DateTimeFormatterBuilder.NumberFormatter
estimateParsedLength
-
Constructor Details
-
FixedNumber
-
-
Method Details
-
parseInto
Description copied from interface:InternalParserParse an element from the given text, saving any fields into the given DateTimeParserBucket. If the parse succeeds, the return value is the new text position. Note that the parse may succeed without fully reading the text.If 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.
- Specified by:
parseIntoin interfaceInternalParser- Overrides:
parseIntoin classDateTimeFormatterBuilder.NumberFormatter- Parameters:
bucket- field are saved into this, not nulltext- the text to parse, not nullposition- position to start parsing from- Returns:
- new position, negative value means parse failed - apply complement operator (~) to get position of failure
-