Interface SimilarProductPair
public interface SimilarProductPair
A pair of SimilarProducts
Example to create an instance using the builder pattern
SimilarProductPair similarProductPair = SimilarProductPair.builder()
.confidence(0.3)
.plusProducts(productsBuilder -> productsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic SimilarProductPairBuilder
builder()
builder factory method for SimilarProductPairstatic SimilarProductPairBuilder
builder
(SimilarProductPair template) create builder for SimilarProductPair instancestatic SimilarProductPair
deepCopy
(SimilarProductPair template) factory method to create a deep copy of SimilarProductPair@NotNull Double
The probability of product similarity.@NotNull @Valid List<SimilarProduct>
static SimilarProductPair
of()
factory methodstatic SimilarProductPair
of
(SimilarProductPair template) factory method to create a shallow copy SimilarProductPairvoid
setConfidence
(Double confidence) The probability of product similarity.void
setProducts
(SimilarProduct... products) set productsvoid
setProducts
(List<SimilarProduct> products) set productsstatic com.fasterxml.jackson.core.type.TypeReference<SimilarProductPair>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withSimilarProductPair
(Function<SimilarProductPair, T> helper) accessor map function
-
Method Details
-
getConfidence
The probability of product similarity.
- Returns:
- confidence
-
getProducts
- Returns:
- products
-
setConfidence
The probability of product similarity.
- Parameters:
confidence
- value to be set
-
setProducts
set products- Parameters:
products
- values to be set
-
setProducts
set products- Parameters:
products
- values to be set
-
of
factory method- Returns:
- instance of SimilarProductPair
-
of
factory method to create a shallow copy SimilarProductPair- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of SimilarProductPair- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for SimilarProductPair- Returns:
- builder
-
builder
create builder for SimilarProductPair instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withSimilarProductPair
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
-