Class AssetDimensionsBuilder
java.lang.Object
com.commercetools.importapi.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()
The height of the asset source.getW()
The width of the asset source.The height of the asset source.static AssetDimensionsBuilder
of()
factory method for an instance of AssetDimensionsBuilderstatic AssetDimensionsBuilder
of
(AssetDimensions template) create builder for AssetDimensions instanceThe width of the asset source.
-
Constructor Details
-
AssetDimensionsBuilder
public AssetDimensionsBuilder()
-
-
Method Details
-
w
The width of the asset source.
- Parameters:
w
- value to be set- Returns:
- Builder
-
h
The height of the asset source.
- Parameters:
h
- value to be set- Returns:
- Builder
-
getW
The width of the asset source.
- Returns:
- w
-
getH
The 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
-