Class ImageBuilder
java.lang.Object
com.commercetools.history.models.common.ImageBuilder
ImageBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
Image image = Image.builder()
.url("{url}")
.dimensions(dimensionsBuilder -> dimensionsBuilder)
.label("{label}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds Image with checking for non-null required valuesbuilds Image without checking for non-null required valuesdimensions
(ImageDimensions dimensions) set the value to the dimensionsset the value to the dimensions using the builder functionvalue of dimensions}getLabel()
value of label}getUrl()
value of url}set the value to the labelstatic ImageBuilder
of()
factory method for an instance of ImageBuilderstatic ImageBuilder
create builder for Image instanceset the value to the urlset the value to the dimensions using the builder function
-
Constructor Details
-
ImageBuilder
public ImageBuilder()
-
-
Method Details
-
url
set the value to the url- Parameters:
url
- value to be set- Returns:
- Builder
-
dimensions
set the value to the dimensions using the builder function- Parameters:
builder
- function to build the dimensions value- Returns:
- Builder
-
withDimensions
set the value to the dimensions using the builder function- Parameters:
builder
- function to build the dimensions value- Returns:
- Builder
-
dimensions
set the value to the dimensions- Parameters:
dimensions
- value to be set- Returns:
- Builder
-
label
set the value to the label- Parameters:
label
- value to be set- Returns:
- Builder
-
getUrl
value of url}- Returns:
- url
-
getDimensions
value of dimensions}- Returns:
- dimensions
-
getLabel
value of label}- Returns:
- label
-
build
builds Image with checking for non-null required values -
buildUnchecked
builds Image without checking for non-null required values- Returns:
- Image
-
of
factory method for an instance of ImageBuilder- Returns:
- builder
-
of
create builder for Image instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-