class ReadableDurationConverter extends AbstractConverter implements DurationConverter, PeriodConverter
| Modifier and Type | Field and Description |
|---|---|
(package private) static ReadableDurationConverter |
INSTANCE
Singleton instance.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ReadableDurationConverter()
Restricted constructor.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getDurationMillis(java.lang.Object object)
Extracts the millis from an object of this converter's type.
|
java.lang.Class<?> |
getSupportedType()
Returns ReadableDuration.class.
|
void |
setInto(ReadWritablePeriod writablePeriod,
java.lang.Object object,
Chronology chrono)
Extracts duration values from an object of this converter's type, and
sets them into the given ReadWritableDuration.
|
getChronology, getChronology, getInstantMillis, getPartialValues, getPartialValues, getPeriodType, isReadableInterval, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetPeriodTypestatic final ReadableDurationConverter INSTANCE
protected ReadableDurationConverter()
public long getDurationMillis(java.lang.Object object)
getDurationMillis in interface DurationConverterobject - the object to convert, must not be nulljava.lang.NullPointerException - if the object is nulljava.lang.ClassCastException - if the object is an invalid typejava.lang.IllegalArgumentException - if the object is invalidpublic void setInto(ReadWritablePeriod writablePeriod, java.lang.Object object, Chronology chrono)
setInto in interface PeriodConverterwritablePeriod - period to get modifiedobject - the object to convert, must not be nullchrono - the chronology to use, must not be nulljava.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 java.lang.Class<?> getSupportedType()
getSupportedType in interface Converter