class LongConverter extends AbstractConverter implements InstantConverter, PartialConverter, DurationConverter
Modifier and Type | Field and Description |
---|---|
(package private) static LongConverter |
INSTANCE
Singleton instance.
|
Modifier | Constructor and Description |
---|---|
protected |
LongConverter()
Restricted constructor.
|
Modifier and Type | Method and Description |
---|---|
long |
getDurationMillis(java.lang.Object object)
Gets the millisecond duration, which is the Long value.
|
long |
getInstantMillis(java.lang.Object object,
Chronology chrono)
Gets the millisecond instant, which is the Long value.
|
java.lang.Class<?> |
getSupportedType()
Returns Long.class.
|
getChronology, getChronology, getPartialValues, getPartialValues, getPeriodType, isReadableInterval, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getChronology, getChronology
getChronology, getChronology, getPartialValues, getPartialValues
static final LongConverter INSTANCE
public long getInstantMillis(java.lang.Object object, Chronology chrono)
getInstantMillis
in interface InstantConverter
getInstantMillis
in class AbstractConverter
object
- the Long to convert, must not be nullchrono
- the chronology to use, which is always non-nulljava.lang.NullPointerException
- if the object is nulljava.lang.ClassCastException
- if the object is an invalid typepublic long getDurationMillis(java.lang.Object object)
getDurationMillis
in interface DurationConverter
object
- the Long to convert, 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