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 ResultItemBuilderbuilder()builder factory method for ResultItemstatic ResultItemBuilderbuilder(ResultItem template) create builder for ResultItem instancestatic ResultItemdeepCopy(ResultItem template) factory method to create a deep copy of ResultItem@NotNull StringThe URL of the image.@NotNull @Valid List<ProductVariant>An array of product variants containing the image URL.static ResultItemof()factory methodstatic ResultItemof(ResultItem template) factory method to create a shallow copy ResultItemvoidsetImageUrl(String imageUrl) The URL of the image.voidsetProductVariants(ProductVariant... productVariants) An array of product variants containing the image URL.voidsetProductVariants(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> TwithResultItem(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
-