Class ImageDimensionsBuilder
java.lang.Object
com.commercetools.history.models.common.ImageDimensionsBuilder
- All Implemented Interfaces:
Builder<ImageDimensions>
ImageDimensionsBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ImageDimensions imageDimensions = ImageDimensions.builder()
.w(1)
.h(1)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ImageDimensions with checking for non-null required valuesbuilds ImageDimensions without checking for non-null required valuesgetH()
value of h}getW()
value of w}set the value to the hstatic ImageDimensionsBuilder
of()
factory method for an instance of ImageDimensionsBuilderstatic ImageDimensionsBuilder
of
(ImageDimensions template) create builder for ImageDimensions instanceset the value to the w
-
Constructor Details
-
ImageDimensionsBuilder
public ImageDimensionsBuilder()
-
-
Method Details
-
w
set the value to the w- Parameters:
w
- value to be set- Returns:
- Builder
-
h
set the value to the h- Parameters:
h
- value to be set- Returns:
- Builder
-
getW
value of w}- Returns:
- w
-
getH
value of h}- Returns:
- h
-
build
builds ImageDimensions with checking for non-null required values- Specified by:
build
in interfaceBuilder<ImageDimensions>
- Returns:
- ImageDimensions
-
buildUnchecked
builds ImageDimensions without checking for non-null required values- Returns:
- ImageDimensions
-
of
factory method for an instance of ImageDimensionsBuilder- Returns:
- builder
-
of
create builder for ImageDimensions instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-