|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PartialConverter defines how an object is converted to a ReadablePartial.
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.
Method Summary | |
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. |
Methods inherited from interface org.joda.time.convert.Converter |
getSupportedType |
Method Detail |
public Chronology getChronology(Object object, DateTimeZone zone)
object
- the object to convertzone
- the specified zone to use, null means default zone
ClassCastException
- if the object is invalidpublic Chronology getChronology(Object object, Chronology chrono)
object
- the object to convertchrono
- the chronology to use, null usually means ISO
ClassCastException
- if the object is invalidpublic int[] 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 invalidpublic int[] 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 preferred
ClassCastException
- if the object is invalid
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |