Class JavaTimeFormatter

  • Direct Known Subclasses:
    ApiClient

    @Generated("org.openapitools.codegen.languages.JavaClientCodegen")
    public class JavaTimeFormatter
    extends java.lang.Object
    Class that add parsing/formatting support for Java 8+ OffsetDateTime class. It's generated for java clients when AbstractJavaCodegen#dateLibrary specified as java8.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String formatOffsetDateTime​(org.threeten.bp.OffsetDateTime offsetDateTime)
      Format the given OffsetDateTime object into string.
      org.threeten.bp.format.DateTimeFormatter getOffsetDateTimeFormatter()
      Get the date format used to parse/format OffsetDateTime parameters.
      org.threeten.bp.OffsetDateTime parseOffsetDateTime​(java.lang.String str)
      Parse the given string into OffsetDateTime object.
      void setOffsetDateTimeFormatter​(org.threeten.bp.format.DateTimeFormatter offsetDateTimeFormatter)
      Set the date format used to parse/format OffsetDateTime parameters.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JavaTimeFormatter

        public JavaTimeFormatter()
    • Method Detail

      • getOffsetDateTimeFormatter

        public org.threeten.bp.format.DateTimeFormatter getOffsetDateTimeFormatter()
        Get the date format used to parse/format OffsetDateTime parameters.
        Returns:
        DateTimeFormatter
      • setOffsetDateTimeFormatter

        public void setOffsetDateTimeFormatter​(org.threeten.bp.format.DateTimeFormatter offsetDateTimeFormatter)
        Set the date format used to parse/format OffsetDateTime parameters.
        Parameters:
        offsetDateTimeFormatter - DateTimeFormatter
      • parseOffsetDateTime

        public org.threeten.bp.OffsetDateTime parseOffsetDateTime​(java.lang.String str)
        Parse the given string into OffsetDateTime object.
        Parameters:
        str - String
        Returns:
        OffsetDateTime
      • formatOffsetDateTime

        public java.lang.String formatOffsetDateTime​(org.threeten.bp.OffsetDateTime offsetDateTime)
        Format the given OffsetDateTime object into string.
        Parameters:
        offsetDateTime - OffsetDateTime
        Returns:
        OffsetDateTime in string format