Class KeyReferenceBuilder
java.lang.Object
com.commercetools.history.models.common.KeyReferenceBuilder
- All Implemented Interfaces:
Builder<KeyReference>
KeyReferenceBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
KeyReference keyReference = KeyReference.builder()
.key("{key}")
.typeId(ReferenceTypeId.ASSOCIATE_ROLE)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds KeyReference with checking for non-null required valuesbuilds KeyReference without checking for non-null required valuesgetKey()
value of key}value of typeId}set the value to the keystatic KeyReferenceBuilder
of()
factory method for an instance of KeyReferenceBuilderstatic KeyReferenceBuilder
of
(KeyReference template) create builder for KeyReference instancetypeId
(ReferenceTypeId typeId) set the value to the typeId
-
Constructor Details
-
KeyReferenceBuilder
public KeyReferenceBuilder()
-
-
Method Details
-
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
-
getKey
value of key}- Returns:
- key
-
getTypeId
value of typeId}- Returns:
- typeId
-
build
builds KeyReference with checking for non-null required values- Specified by:
build
in interfaceBuilder<KeyReference>
- Returns:
- KeyReference
-
buildUnchecked
builds KeyReference without checking for non-null required values- Returns:
- KeyReference
-
of
factory method for an instance of KeyReferenceBuilder- Returns:
- builder
-
of
create builder for KeyReference instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-