Class LocalZonedTimestampData

    • Method Detail

      • getEpochMillisecond

        public long getEpochMillisecond()
        Returns the number of epoch milliseconds since epoch 1970-01-01 00:00:00.
      • getEpochNanoOfMillisecond

        public int getEpochNanoOfMillisecond()
        Returns the number of epoch nanoseconds (the nanoseconds within the milliseconds).

        The value range is from 0 to 999,999.

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • fromEpochMillis

        public static LocalZonedTimestampData fromEpochMillis​(long millisecond)
        Creates an instance of LocalZonedTimestampData from epoch milliseconds.

        The nanos-of-millisecond field will be set to zero.

        Parameters:
        millisecond - the number of epoch milliseconds since epoch 1970-01-01 00:00:00; a negative number is the number of epoch milliseconds before epoch 1970-01-01 00:00:00
      • fromEpochMillis

        public static LocalZonedTimestampData fromEpochMillis​(long millisecond,
                                                              int epochNanoOfMillisecond)
        Creates an instance of LocalZonedTimestampData from epoch milliseconds and a epoch nanos-of-millisecond.
        Parameters:
        millisecond - the number of epoch milliseconds since epoch 1970-01-01 00:00:00; a negative number is the number of epoch milliseconds before epoch 1970-01-01 00:00:00
        epochNanoOfMillisecond - the epoch nanoseconds within the millisecond, from 0 to 999,999
      • isCompact

        public static boolean isCompact​(int precision)
        Returns whether the local zoned timestamp data is small enough to be stored in a long of milliseconds.