Class ResourceIdentifierBuilder
java.lang.Object
com.commercetools.history.models.common.ResourceIdentifierBuilder
- All Implemented Interfaces:
Builder<ResourceIdentifier>
ResourceIdentifierBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ResourceIdentifier resourceIdentifier = ResourceIdentifier.builder()
.id("{id}")
.key("{key}")
.typeId(ReferenceTypeId.ASSOCIATE_ROLE)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ResourceIdentifier with checking for non-null required valuesbuilds ResourceIdentifier without checking for non-null required valuesgetId()
value of id}getKey()
value of key}value of typeId}set the value to the idset the value to the keystatic ResourceIdentifierBuilder
of()
factory method for an instance of ResourceIdentifierBuilderstatic ResourceIdentifierBuilder
of
(ResourceIdentifier template) create builder for ResourceIdentifier instancetypeId
(ReferenceTypeId typeId) set the value to the typeId
-
Constructor Details
-
ResourceIdentifierBuilder
public ResourceIdentifierBuilder()
-
-
Method Details
-
id
set the value to the id- Parameters:
id
- value to be set- Returns:
- Builder
-
key
set the value to the key- Parameters:
key
- value to be set- Returns:
- Builder
-
typeId
set the value to the typeId- Parameters:
typeId
- value to be set- Returns:
- Builder
-
getId
value of id}- Returns:
- id
-
getKey
value of key}- Returns:
- key
-
getTypeId
value of typeId}- Returns:
- typeId
-
build
builds ResourceIdentifier with checking for non-null required values- Specified by:
build
in interfaceBuilder<ResourceIdentifier>
- Returns:
- ResourceIdentifier
-
buildUnchecked
builds ResourceIdentifier without checking for non-null required values- Returns:
- ResourceIdentifier
-
of
factory method for an instance of ResourceIdentifierBuilder- Returns:
- builder
-
of
create builder for ResourceIdentifier instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-