class ReadablePeriodConverter extends AbstractConverter implements PeriodConverter
| Modifier and Type | Field and Description |
|---|---|
(package private) static ReadablePeriodConverter |
INSTANCE
Singleton instance.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ReadablePeriodConverter()
Restricted constructor.
|
| Modifier and Type | Method and Description |
|---|---|
PeriodType |
getPeriodType(java.lang.Object object)
Selects a suitable period type for the given object.
|
java.lang.Class<?> |
getSupportedType()
Returns ReadablePeriod class.
|
void |
setInto(ReadWritablePeriod duration,
java.lang.Object object,
Chronology chrono)
Extracts duration values from an object of this converter's type, and
sets them into the given ReadWritablePeriod.
|
getChronology, getChronology, getInstantMillis, getPartialValues, getPartialValues, isReadableInterval, toStringstatic final ReadablePeriodConverter INSTANCE
protected ReadablePeriodConverter()
public void setInto(ReadWritablePeriod duration, java.lang.Object object, Chronology chrono)
setInto in interface PeriodConverterduration - duration to get modifiedobject - the object to convert, must not be nullchrono - the chronology to usejava.lang.NullPointerException - if the duration or object is nulljava.lang.ClassCastException - if the object is an invalid typejava.lang.IllegalArgumentException - if the object is invalidpublic PeriodType getPeriodType(java.lang.Object object)
getPeriodType in interface PeriodConvertergetPeriodType in class AbstractConverterobject - the object to examine, must not be 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