Class DateTimeRfc1123


  • public final class DateTimeRfc1123
    extends java.lang.Object
    Wrapper over org.threeten.bp.OffsetDateTime used for specifying RFC1123 format during serialization and deserialization.
    • Constructor Summary

      Constructors 
      Constructor Description
      DateTimeRfc1123​(java.lang.String formattedString)
      Creates a new DateTimeRfc1123 object with the specified DateTime.
      DateTimeRfc1123​(org.threeten.bp.OffsetDateTime dateTime)
      Creates a new DateTimeRfc1123 object with the specified DateTime.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      org.threeten.bp.OffsetDateTime getDateTime()
      Returns the underlying DateTime.
      int hashCode()  
      static java.lang.String toRfc1123String​(org.threeten.bp.OffsetDateTime dateTime)
      Convert the dateTime to date time string in RFC1123 format.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • DateTimeRfc1123

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

        public DateTimeRfc1123​(java.lang.String formattedString)
        Creates a new DateTimeRfc1123 object with the specified DateTime.
        Parameters:
        formattedString - The datetime string in RFC1123 format
    • Method Detail

      • getDateTime

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

        public static java.lang.String toRfc1123String​(org.threeten.bp.OffsetDateTime dateTime)
        Convert the dateTime to date time string in RFC1123 format.
        Parameters:
        dateTime - The date time in OffsetDateTime format.
        Returns:
        The date time string in RFC1123 format.
        Throws:
        java.lang.IllegalArgumentException - If OffsetDateTime.getDayOfWeek() or OffsetDateTime.getDayOfMonth() is an unknown value.
      • 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