class ReadablePartialConverter extends AbstractConverter implements PartialConverter
Modifier and Type | Field and Description |
---|---|
(package private) static ReadablePartialConverter |
INSTANCE
Singleton instance.
|
Modifier | Constructor and Description |
---|---|
protected |
ReadablePartialConverter()
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 ReadablePartial.
|
int[] |
getPartialValues(ReadablePartial fieldSource,
java.lang.Object object,
Chronology chrono)
Extracts the values of the partial from an object of this converter's type.
|
java.lang.Class<?> |
getSupportedType()
Returns ReadableInstant.class.
|
getInstantMillis, getPartialValues, getPeriodType, isReadableInterval, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPartialValues
static final ReadablePartialConverter INSTANCE
protected ReadablePartialConverter()
public Chronology getChronology(java.lang.Object object, DateTimeZone zone)
getChronology
in interface PartialConverter
getChronology
in class AbstractConverter
object
- the ReadablePartial 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 PartialConverter
getChronology
in class AbstractConverter
object
- the ReadablePartial to convert, must not be nullchrono
- the chronology to use, null means use that from objectpublic int[] getPartialValues(ReadablePartial fieldSource, java.lang.Object object, Chronology chrono)
getPartialValues
in interface PartialConverter
getPartialValues
in class AbstractConverter
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()java.lang.ClassCastException
- if the object is invalidpublic java.lang.Class<?> getSupportedType()
getSupportedType
in interface Converter