class ReadableInstantConverter extends AbstractConverter implements InstantConverter, PartialConverter
Modifier and Type | Field and Description |
---|---|
(package private) static ReadableInstantConverter |
INSTANCE
Singleton instance.
|
Modifier | Constructor and Description |
---|---|
protected |
ReadableInstantConverter()
Restricted constructor.
|
Modifier and Type | Method and Description |
---|---|
Chronology |
getChronology(java.lang.Object object,
Chronology chrono)
Gets the chronology, which is taken from the ReadableInstant.
|
Chronology |
getChronology(java.lang.Object object,
DateTimeZone zone)
Gets the chronology, which is taken from the ReadableInstant.
|
long |
getInstantMillis(java.lang.Object object,
Chronology chrono)
Extracts the millis from an object of this converter's type.
|
java.lang.Class<?> |
getSupportedType()
Returns ReadableInstant.class.
|
getPartialValues, getPartialValues, getPeriodType, isReadableInterval, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPartialValues, getPartialValues
static final ReadableInstantConverter INSTANCE
protected ReadableInstantConverter()
public Chronology getChronology(java.lang.Object object, DateTimeZone zone)
getChronology
in interface InstantConverter
getChronology
in interface PartialConverter
getChronology
in class AbstractConverter
object
- the ReadableInstant to convert, must not be nullzone
- the specified zone to use, null means default zonepublic Chronology getChronology(java.lang.Object object, Chronology chrono)
If the passed in chronology is non-null, it is used. Otherwise the chronology from the instant is used.
getChronology
in interface InstantConverter
getChronology
in interface PartialConverter
getChronology
in class AbstractConverter
object
- the ReadableInstant to convert, must not be nullchrono
- the chronology to use, null means use that from objectpublic long getInstantMillis(java.lang.Object object, Chronology chrono)
getInstantMillis
in interface InstantConverter
getInstantMillis
in class AbstractConverter
object
- the ReadableInstant to convert, must not be nullchrono
- the non-null result of getChronologyjava.lang.NullPointerException
- if the object is nulljava.lang.ClassCastException
- if the object is an invalid typepublic java.lang.Class<?> getSupportedType()
getSupportedType
in interface Converter