public interface PartialConverter extends Converter
The two methods in this interface must be called in order, as the
getPartialValues
method relies on the result of the
getChronology
method being passed in.
Modifier and Type | Method and Description |
---|---|
Chronology |
getChronology(Object object,
Chronology chrono)
Extracts the chronology from an object of this converter's type
where the chronology is specified.
|
Chronology |
getChronology(Object object,
DateTimeZone zone)
Extracts the chronology from an object of this converter's type
where the time zone is specified.
|
int[] |
getPartialValues(ReadablePartial fieldSource,
Object object,
Chronology chrono)
Extracts the values of the partial from an object of this converter's type.
|
int[] |
getPartialValues(ReadablePartial fieldSource,
Object object,
Chronology chrono,
DateTimeFormatter parser)
Extracts the values of the partial from an object of this converter's type.
|
getSupportedType
Chronology getChronology(Object object, DateTimeZone zone)
object
- the object to convertzone
- the specified zone to use, null means default zoneClassCastException
- if the object is invalidChronology getChronology(Object object, Chronology chrono)
object
- the object to convertchrono
- the chronology to use, null usually means ISOClassCastException
- if the object is invalidint[] getPartialValues(ReadablePartial fieldSource, Object object, Chronology chrono)
fieldSource
- a partial that provides access to the fields.
This partial may be incomplete and only getFieldType(int) should be usedobject
- the object to convertchrono
- the chronology to use, which is the non-null result of getChronology()ClassCastException
- if the object is invalidint[] getPartialValues(ReadablePartial fieldSource, Object object, Chronology chrono, DateTimeFormatter parser)
fieldSource
- a partial that provides access to the fields.
This partial may be incomplete and only getFieldType(int) should be usedobject
- the object to convertchrono
- the chronology to use, which is the non-null result of getChronology()parser
- if converting from a String, the given parser is preferredClassCastException
- if the object is invalidCopyright © 2002–2022 Joda.org. All rights reserved.