Class AssetDimensionsBuilder
java.lang.Object
com.commercetools.api.models.common.AssetDimensionsBuilder
- All Implemented Interfaces:
Builder<AssetDimensions>
AssetDimensionsBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
AssetDimensions assetDimensions = AssetDimensions.builder()
.w(0.3)
.h(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds AssetDimensions with checking for non-null required valuesbuilds AssetDimensions without checking for non-null required valuesgetH()
Height of the Asset source.getW()
Width of the Asset source.Height of the Asset source.static AssetDimensionsBuilder
of()
factory method for an instance of AssetDimensionsBuilderstatic AssetDimensionsBuilder
of
(AssetDimensions template) create builder for AssetDimensions instanceWidth of the Asset source.
-
Constructor Details
-
AssetDimensionsBuilder
public AssetDimensionsBuilder()
-
-
Method Details
-
w
Width of the Asset source.
- Parameters:
w
- value to be set- Returns:
- Builder
-
h
Height of the Asset source.
- Parameters:
h
- value to be set- Returns:
- Builder
-
getW
Width of the Asset source.
- Returns:
- w
-
getH
Height of the Asset source.
- Returns:
- h
-
build
builds AssetDimensions with checking for non-null required values- Specified by:
build
in interfaceBuilder<AssetDimensions>
- Returns:
- AssetDimensions
-
buildUnchecked
builds AssetDimensions without checking for non-null required values- Returns:
- AssetDimensions
-
of
factory method for an instance of AssetDimensionsBuilder- Returns:
- builder
-
of
create builder for AssetDimensions instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-