Class ErrorObjectBuilder
java.lang.Object
com.commercetools.history.models.change_history.ErrorObjectBuilder
- All Implemented Interfaces:
Builder<ErrorObject>
ErrorObjectBuilder
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()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ErrorObject with checking for non-null required valuesbuilds ErrorObject without checking for non-null required valuesset the value to the codegetCode()
value of code}value of message}set the value to the messagestatic ErrorObjectBuilder
of()
factory method for an instance of ErrorObjectBuilderstatic ErrorObjectBuilder
of
(ErrorObject template) create builder for ErrorObject instance
-
Constructor Details
-
ErrorObjectBuilder
public ErrorObjectBuilder()
-
-
Method Details
-
code
set the value to the code- Parameters:
code
- value to be set- Returns:
- Builder
-
message
set the value to the message- Parameters:
message
- value to be set- Returns:
- Builder
-
getCode
value of code}- Returns:
- code
-
getMessage
value of message}- Returns:
- message
-
build
builds ErrorObject with checking for non-null required values- Specified by:
build
in interfaceBuilder<ErrorObject>
- Returns:
- ErrorObject
-
buildUnchecked
builds ErrorObject without checking for non-null required values- Returns:
- ErrorObject
-
of
factory method for an instance of ErrorObjectBuilder- Returns:
- builder
-
of
create builder for ErrorObject instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-