Class JavaTimeFormatter

java.lang.Object
com.kryptokrauts.sophia.compiler.generated.JavaTimeFormatter

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
           date="2022-01-10T23:40:13.294772960Z[Etc/UTC]")
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.
  • Constructor Summary

    Constructors
    Constructor Description
    JavaTimeFormatter()  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String formatOffsetDateTime​(java.time.OffsetDateTime offsetDateTime)
    Format the given OffsetDateTime object into string.
    java.time.format.DateTimeFormatter getOffsetDateTimeFormatter()
    Get the date format used to parse/format OffsetDateTime parameters.
    java.time.OffsetDateTime parseOffsetDateTime​(java.lang.String str)
    Parse the given string into OffsetDateTime object.
    void setOffsetDateTimeFormatter​(java.time.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 Details

    • JavaTimeFormatter

      public JavaTimeFormatter()
  • Method Details

    • getOffsetDateTimeFormatter

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

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

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

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