| java.lang.Object org.joda.time.convert.AbstractConverter org.joda.time.convert.CalendarConverter
CalendarConverter | final class CalendarConverter extends AbstractConverter implements InstantConverter,PartialConverter(Code) | | CalendarConverter converts a java util Calendar to an instant or partial.
The Calendar is converted to milliseconds and the chronology that best
matches the calendar.
author: Stephen Colebourne since: 1.0 |
CalendarConverter | protected CalendarConverter()(Code) | | Restricted constructor.
|
getChronology | public Chronology getChronology(Object object, Chronology chrono)(Code) | | Gets the chronology.
If a chronology is specified then it is used.
Otherwise, it is the GJChronology if a GregorianCalendar is used,
BuddhistChronology if a BuddhistCalendar is used or ISOChronology otherwise.
The time zone is extracted from the calendar if possible, default used if not.
Parameters: object - the Calendar to convert, must not be null Parameters: chrono - the chronology to use, null means use Calendar the chronology, never null throws: NullPointerException - if the object is null throws: ClassCastException - if the object is an invalid type |
getChronology | public Chronology getChronology(Object object, DateTimeZone zone)(Code) | | Gets the chronology, which is the GJChronology if a GregorianCalendar is used,
BuddhistChronology if a BuddhistCalendar is used or ISOChronology otherwise.
The time zone specified is used in preference to that on the calendar.
Parameters: object - the Calendar to convert, must not be null Parameters: zone - the specified zone to use, null means default zone the chronology, never null throws: NullPointerException - if the object is null throws: ClassCastException - if the object is an invalid type |
getInstantMillis | public long getInstantMillis(Object object, Chronology chrono)(Code) | | Gets the millis, which is the Calendar millis value.
Parameters: object - the Calendar to convert, must not be null Parameters: chrono - the chronology result from getChronology, non-null the millisecond value throws: NullPointerException - if the object is null throws: ClassCastException - if the object is an invalid type |
getSupportedType | public Class getSupportedType()(Code) | | Returns Calendar.class.
Calendar.class |
|
|