Package org.joda.time.format
Class DateTimeFormatterBuilder.UnpaddedNumber
- java.lang.Object
-
- org.joda.time.format.DateTimeFormatterBuilder.NumberFormatter
-
- org.joda.time.format.DateTimeFormatterBuilder.UnpaddedNumber
-
- All Implemented Interfaces:
InternalParser
,InternalPrinter
- Enclosing class:
- DateTimeFormatterBuilder
static class DateTimeFormatterBuilder.UnpaddedNumber extends DateTimeFormatterBuilder.NumberFormatter
-
-
Field Summary
-
Fields inherited from class org.joda.time.format.DateTimeFormatterBuilder.NumberFormatter
iFieldType, iMaxParsedDigits, iSigned
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
UnpaddedNumber(DateTimeFieldType fieldType, int maxParsedDigits, boolean signed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
estimatePrintedLength()
Returns the expected maximum number of characters produced.void
printTo(java.lang.Appendable appendable, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, java.util.Locale locale)
Prints an instant from milliseconds since 1970-01-01T00:00:00Z, using the given Chronology.void
printTo(java.lang.Appendable appendable, ReadablePartial partial, java.util.Locale locale)
Prints a ReadablePartial.-
Methods inherited from class org.joda.time.format.DateTimeFormatterBuilder.NumberFormatter
estimateParsedLength, parseInto
-
-
-
-
Constructor Detail
-
UnpaddedNumber
protected UnpaddedNumber(DateTimeFieldType fieldType, int maxParsedDigits, boolean signed)
-
-
Method Detail
-
estimatePrintedLength
public int estimatePrintedLength()
Description copied from interface:InternalPrinter
Returns the expected maximum number of characters produced. The actual amount should rarely exceed this estimate.- Returns:
- the estimated length
-
printTo
public void printTo(java.lang.Appendable appendable, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, java.util.Locale locale) throws java.io.IOException
Description copied from interface:InternalPrinter
Prints an instant from milliseconds since 1970-01-01T00:00:00Z, using the given Chronology.- Parameters:
appendable
- formatted instant is appended to, not nullinstant
- millis since 1970-01-01T00:00:00Zchrono
- the chronology to use, not nulldisplayOffset
- if a time zone offset is printed, force it to use this millisecond valuedisplayZone
- the time zone to use, null means local timelocale
- the locale to use, null means default locale- Throws:
java.io.IOException
-
printTo
public void printTo(java.lang.Appendable appendable, ReadablePartial partial, java.util.Locale locale) throws java.io.IOException
Description copied from interface:InternalPrinter
Prints a ReadablePartial.- Parameters:
appendable
- formatted instant is appended to, not nullpartial
- partial to format, not nulllocale
- the locale to use, null means default locale- Throws:
java.io.IOException
-
-