Interface ErrorObject
public interface ErrorObject
ErrorObject
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ErrorObject errorObject = ErrorObject.builder()
.code("{code}")
.message("{message}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorObjectBuilder
builder()
builder factory method for ErrorObjectstatic ErrorObjectBuilder
builder
(ErrorObject template) create builder for ErrorObject instancestatic ErrorObject
deepCopy
(ErrorObject template) factory method to create a deep copy of ErrorObject@NotNull String
getCode()
@NotNull String
static ErrorObject
of()
factory methodstatic ErrorObject
of
(ErrorObject template) factory method to create a shallow copy ErrorObjectvoid
set codevoid
setMessage
(String message) set messagestatic com.fasterxml.jackson.core.type.TypeReference<ErrorObject>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withErrorObject
(Function<ErrorObject, T> helper) accessor map function
-
Method Details
-
getCode
- Returns:
- code
-
getMessage
- Returns:
- message
-
setCode
set code- Parameters:
code
- value to be set
-
setMessage
set message- Parameters:
message
- value to be set
-
of
factory method- Returns:
- instance of ErrorObject
-
of
factory method to create a shallow copy ErrorObject- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ErrorObject- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ErrorObject- Returns:
- builder
-
builder
create builder for ErrorObject instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withErrorObject
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-