Class ImageDimensionsBuilder
java.lang.Object
com.commercetools.api.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(0.3)
.h(0.3)
.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()
Height of the image.getW()
Width of the image.Height of the image.static ImageDimensionsBuilder
of()
factory method for an instance of ImageDimensionsBuilderstatic ImageDimensionsBuilder
of
(ImageDimensions template) create builder for ImageDimensions instanceWidth of the image.
-
Constructor Details
-
ImageDimensionsBuilder
public ImageDimensionsBuilder()
-
-
Method Details
-
w
Width of the image.
- Parameters:
w
- value to be set- Returns:
- Builder
-
h
Height of the image.
- Parameters:
h
- value to be set- Returns:
- Builder
-
getW
Width of the image.
- Returns:
- w
-
getH
Height of the image.
- 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
-