Class ImageBuilder
Example to create an instance using the builder pattern
Image image = Image.builder()
.url("{url}")
.dimensions(dimensionsBuilder -> dimensionsBuilder)
.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
(AssetDimensions dimensions) Dimensions of the original image.Dimensions of the original image.Dimensions of the original image.getLabel()
Custom label that can be used, for example, as an image description.getUrl()
URL of the image in its original size.Custom label that can be used, for example, as an image description.static ImageBuilder
of()
factory method for an instance of ImageBuilderstatic ImageBuilder
create builder for Image instanceURL of the image in its original size.Dimensions of the original image.
-
Constructor Details
-
ImageBuilder
public ImageBuilder()
-
-
Method Details
-
url
URL of the image in its original size. The URL must be unique within a single variant. It can be used to obtain the image in different sizes.
- Parameters:
url
- value to be set- Returns:
- Builder
-
dimensions
Dimensions of the original image. This can be used by your application, for example, to determine whether the image is large enough to display a zoom view.
- Parameters:
builder
- function to build the dimensions value- Returns:
- Builder
-
withDimensions
Dimensions of the original image. This can be used by your application, for example, to determine whether the image is large enough to display a zoom view.
- Parameters:
builder
- function to build the dimensions value- Returns:
- Builder
-
dimensions
Dimensions of the original image. This can be used by your application, for example, to determine whether the image is large enough to display a zoom view.
- Parameters:
dimensions
- value to be set- Returns:
- Builder
-
label
Custom label that can be used, for example, as an image description.
- Parameters:
label
- value to be set- Returns:
- Builder
-
getUrl
URL of the image in its original size. The URL must be unique within a single variant. It can be used to obtain the image in different sizes.
- Returns:
- url
-
getDimensions
Dimensions of the original image. This can be used by your application, for example, to determine whether the image is large enough to display a zoom view.
- Returns:
- dimensions
-
getLabel
Custom label that can be used, for example, as an image description.
- 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
-