Interface ResultItem
public interface ResultItem
An image URL and the product variants it is contained in. If no matching images are found, ResultItem is not present.
Example to create an instance using the builder pattern
ResultItem resultItem = ResultItem.builder()
.imageUrl("{imageUrl}")
.plusProductVariants(productVariantsBuilder -> productVariantsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ResultItemBuilder
builder()
builder factory method for ResultItemstatic ResultItemBuilder
builder
(ResultItem template) create builder for ResultItem instancestatic ResultItem
deepCopy
(ResultItem template) factory method to create a deep copy of ResultItem@NotNull String
The URL of the image.@NotNull @Valid List<ProductVariant>
An array of product variants containing the image URL.static ResultItem
of()
factory methodstatic ResultItem
of
(ResultItem template) factory method to create a shallow copy ResultItemvoid
setImageUrl
(String imageUrl) The URL of the image.void
setProductVariants
(ProductVariant... productVariants) An array of product variants containing the image URL.void
setProductVariants
(List<ProductVariant> productVariants) An array of product variants containing the image URL.static com.fasterxml.jackson.core.type.TypeReference<ResultItem>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withResultItem
(Function<ResultItem, T> helper) accessor map function
-
Method Details
-
getImageUrl
The URL of the image.
- Returns:
- imageUrl
-
getProductVariants
An array of product variants containing the image URL.
- Returns:
- productVariants
-
setImageUrl
The URL of the image.
- Parameters:
imageUrl
- value to be set
-
setProductVariants
An array of product variants containing the image URL.
- Parameters:
productVariants
- values to be set
-
setProductVariants
An array of product variants containing the image URL.
- Parameters:
productVariants
- values to be set
-
of
factory method- Returns:
- instance of ResultItem
-
of
factory method to create a shallow copy ResultItem- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ResultItem- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ResultItem- Returns:
- builder
-
builder
create builder for ResultItem instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withResultItem
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-