Class UnixTime


  • public final class UnixTime
    extends java.lang.Object
    A wrapper over org.threeten.bp.OffsetDateTime used for specifying unix seconds format during serialization and deserialization.
    • Constructor Summary

      Constructors 
      Constructor Description
      UnixTime​(long unixSeconds)
      Creates a UnixTime object with the specified DateTime.
      UnixTime​(org.threeten.bp.OffsetDateTime dateTime)
      Creates aUnixTime object with the specified DateTime.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      org.threeten.bp.OffsetDateTime getDateTime()
      Get the underlying DateTime.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • UnixTime

        public UnixTime​(org.threeten.bp.OffsetDateTime dateTime)
        Creates aUnixTime object with the specified DateTime.
        Parameters:
        dateTime - The DateTime object to wrap
      • UnixTime

        public UnixTime​(long unixSeconds)
        Creates a UnixTime object with the specified DateTime.
        Parameters:
        unixSeconds - The Unix seconds value
    • Method Detail

      • getDateTime

        public org.threeten.bp.OffsetDateTime getDateTime()
        Get the underlying DateTime.
        Returns:
        The underlying DateTime
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object