final class CalendarConverter extends AbstractConverter implements InstantConverter, PartialConverter
| Modifier and Type | Field and Description |
|---|---|
(package private) static CalendarConverter |
INSTANCE
Singleton instance.
|
| Modifier | Constructor and Description |
|---|---|
protected |
CalendarConverter()
Restricted constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Chronology |
getChronology(java.lang.Object object,
Chronology chrono)
Gets the chronology.
|
Chronology |
getChronology(java.lang.Object object,
DateTimeZone zone)
Gets the chronology, which is the GJChronology if a GregorianCalendar is used,
BuddhistChronology if a BuddhistCalendar is used or ISOChronology otherwise.
|
long |
getInstantMillis(java.lang.Object object,
Chronology chrono)
Gets the millis, which is the Calendar millis value.
|
java.lang.Class<?> |
getSupportedType()
Returns Calendar.class.
|
getPartialValues, getPartialValues, getPeriodType, isReadableInterval, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetPartialValues, getPartialValuesstatic final CalendarConverter INSTANCE
public Chronology getChronology(java.lang.Object object, Chronology chrono)
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.
getChronology in interface InstantConvertergetChronology in interface PartialConvertergetChronology in class AbstractConverterobject - the Calendar to convert, must not be nullchrono - the chronology to use, null means use Calendarjava.lang.NullPointerException - if the object is nulljava.lang.ClassCastException - if the object is an invalid typepublic Chronology getChronology(java.lang.Object object, DateTimeZone zone)
getChronology in interface InstantConvertergetChronology in interface PartialConvertergetChronology in class AbstractConverterobject - the Calendar to convert, must not be nullzone - the specified zone to use, null means default zonejava.lang.NullPointerException - if the object is nulljava.lang.ClassCastException - if the object is an invalid typepublic long getInstantMillis(java.lang.Object object,
Chronology chrono)
getInstantMillis in interface InstantConvertergetInstantMillis in class AbstractConverterobject - the Calendar to convert, must not be nullchrono - the chronology result from getChronology, non-nulljava.lang.NullPointerException - if the object is nulljava.lang.ClassCastException - if the object is an invalid typepublic java.lang.Class<?> getSupportedType()
getSupportedType in interface Converter