class NullConverter extends AbstractConverter implements InstantConverter, PartialConverter, DurationConverter, PeriodConverter, IntervalConverter
Modifier and Type | Field and Description |
---|---|
(package private) static NullConverter |
INSTANCE
Singleton instance.
|
Modifier | Constructor and Description |
---|---|
protected |
NullConverter()
Restricted constructor.
|
Modifier and Type | Method and Description |
---|---|
long |
getDurationMillis(java.lang.Object object)
Gets the millisecond duration, which is zero.
|
java.lang.Class<?> |
getSupportedType()
Returns null.
|
void |
setInto(ReadWritableInterval writableInterval,
java.lang.Object object,
Chronology chrono)
Extracts interval endpoint values from an object of this converter's
type, and sets them into the given ReadWritableInterval.
|
void |
setInto(ReadWritablePeriod duration,
java.lang.Object object,
Chronology chrono)
Sets the given ReadWritableDuration to zero milliseconds.
|
getChronology, getChronology, getInstantMillis, getPartialValues, getPartialValues, getPeriodType, isReadableInterval, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getChronology, getChronology, getInstantMillis
getChronology, getChronology, getPartialValues, getPartialValues
getPeriodType
isReadableInterval
static final NullConverter INSTANCE
public long getDurationMillis(java.lang.Object object)
getDurationMillis
in interface DurationConverter
object
- the object to convert, which is nullpublic void setInto(ReadWritablePeriod duration, java.lang.Object object, Chronology chrono)
setInto
in interface PeriodConverter
duration
- duration to get modifiedobject
- the object to convert, which is nullchrono
- the chronology to usejava.lang.NullPointerException
- if the duration is nullpublic void setInto(ReadWritableInterval writableInterval, java.lang.Object object, Chronology chrono)
setInto
in interface IntervalConverter
writableInterval
- interval to get modified, not nullobject
- the object to convert, which is nullchrono
- the chronology to use, may be nulljava.lang.NullPointerException
- if the interval is nullpublic java.lang.Class<?> getSupportedType()
getSupportedType
in interface Converter