Class LongConverter

    • Field Detail

      • INSTANCE

        static final LongConverter INSTANCE
        Singleton instance.
    • Constructor Detail

      • LongConverter

        protected LongConverter()
        Restricted constructor.
    • Method Detail

      • getInstantMillis

        public long getInstantMillis​(java.lang.Object object,
                                     Chronology chrono)
        Gets the millisecond instant, which is the Long value.
        Specified by:
        getInstantMillis in interface InstantConverter
        Overrides:
        getInstantMillis in class AbstractConverter
        Parameters:
        object - the Long to convert, must not be null
        chrono - the chronology to use, which is always non-null
        Returns:
        the millisecond value
        Throws:
        java.lang.NullPointerException - if the object is null
        java.lang.ClassCastException - if the object is an invalid type
      • getDurationMillis

        public long getDurationMillis​(java.lang.Object object)
        Gets the millisecond duration, which is the Long value.
        Specified by:
        getDurationMillis in interface DurationConverter
        Parameters:
        object - the Long to convert, must not be null
        Returns:
        the millisecond duration
        Throws:
        java.lang.NullPointerException - if the object is null
        java.lang.ClassCastException - if the object is an invalid type
      • getSupportedType

        public java.lang.Class<?> getSupportedType()
        Returns Long.class.
        Specified by:
        getSupportedType in interface Converter
        Returns:
        Long.class