Interface ErrorObject


public interface ErrorObject
ErrorObject
Example to create an instance using the builder pattern

     ErrorObject errorObject = ErrorObject.builder()
             .code("{code}")
             .message("{message}")
             .build()
 
  • Method Details

    • getCode

      @NotNull @NotNull String getCode()
      Returns:
      code
    • getMessage

      @NotNull @NotNull String getMessage()
      Returns:
      message
    • setCode

      void setCode(String code)
      set code
      Parameters:
      code - value to be set
    • setMessage

      void setMessage(String message)
      set message
      Parameters:
      message - value to be set
    • of

      static ErrorObject of()
      factory method
      Returns:
      instance of ErrorObject
    • of

      static ErrorObject of(ErrorObject template)
      factory method to create a shallow copy ErrorObject
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static ErrorObject deepCopy(@Nullable ErrorObject template)
      factory method to create a deep copy of ErrorObject
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ErrorObjectBuilder builder()
      builder factory method for ErrorObject
      Returns:
      builder
    • builder

      static ErrorObjectBuilder builder(ErrorObject template)
      create builder for ErrorObject instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withErrorObject

      default <T> T withErrorObject(Function<ErrorObject,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ErrorObject> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference