Interface SimilarityMeasures
Specify which ProductData attributes to use for estimating similarity and how to weigh them. An attribute's weight can be any whole positive integer, starting with 0. The larger the integer, the higher its weight.
Example to create an instance using the builder pattern
SimilarityMeasures similarityMeasures = SimilarityMeasures.builder()
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic SimilarityMeasuresBuilder
builder()
builder factory method for SimilarityMeasuresstatic SimilarityMeasuresBuilder
builder
(SimilarityMeasures template) create builder for SimilarityMeasures instancestatic SimilarityMeasures
deepCopy
(SimilarityMeasures template) factory method to create a deep copy of SimilarityMeasuresImportance of thedescription
attribute in overall similarity.Importance of thedescription
attribute in overall similarity.getName()
Importance of thename
attribute in overall similarity.getPrice()
Importance of theprice
attribute in overall similarity.Importance of the number of product variants in overall similarity.static SimilarityMeasures
of()
factory methodstatic SimilarityMeasures
of
(SimilarityMeasures template) factory method to create a shallow copy SimilarityMeasuresvoid
setAttribute
(Long attribute) Importance of thedescription
attribute in overall similarity.void
setDescription
(Long description) Importance of thedescription
attribute in overall similarity.void
Importance of thename
attribute in overall similarity.void
Importance of theprice
attribute in overall similarity.void
setVariantCount
(Long variantCount) Importance of the number of product variants in overall similarity.static com.fasterxml.jackson.core.type.TypeReference<SimilarityMeasures>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withSimilarityMeasures
(Function<SimilarityMeasures, T> helper) accessor map function
-
Method Details
-
getName
Long getName()Importance of the
name
attribute in overall similarity.- Returns:
- name
-
getDescription
Long getDescription()Importance of the
description
attribute in overall similarity.- Returns:
- description
-
getAttribute
Long getAttribute()Importance of the
description
attribute in overall similarity.- Returns:
- attribute
-
getVariantCount
Long getVariantCount()Importance of the number of product variants in overall similarity.
- Returns:
- variantCount
-
getPrice
Long getPrice()Importance of the
price
attribute in overall similarity.- Returns:
- price
-
setName
Importance of the
name
attribute in overall similarity.- Parameters:
name
- value to be set
-
setDescription
Importance of the
description
attribute in overall similarity.- Parameters:
description
- value to be set
-
setAttribute
Importance of the
description
attribute in overall similarity.- Parameters:
attribute
- value to be set
-
setVariantCount
Importance of the number of product variants in overall similarity.
- Parameters:
variantCount
- value to be set
-
setPrice
Importance of the
price
attribute in overall similarity.- Parameters:
price
- value to be set
-
of
factory method- Returns:
- instance of SimilarityMeasures
-
of
factory method to create a shallow copy SimilarityMeasures- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of SimilarityMeasures- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for SimilarityMeasures- Returns:
- builder
-
builder
create builder for SimilarityMeasures instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withSimilarityMeasures
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
-