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 SimilarityMeasuresBuilderbuilder()builder factory method for SimilarityMeasuresstatic SimilarityMeasuresBuilderbuilder(SimilarityMeasures template) create builder for SimilarityMeasures instancestatic SimilarityMeasuresdeepCopy(SimilarityMeasures template) factory method to create a deep copy of SimilarityMeasuresImportance of thedescriptionattribute in overall similarity.Importance of thedescriptionattribute in overall similarity.getName()Importance of thenameattribute in overall similarity.getPrice()Importance of thepriceattribute in overall similarity.Importance of the number of product variants in overall similarity.static SimilarityMeasuresof()factory methodstatic SimilarityMeasuresof(SimilarityMeasures template) factory method to create a shallow copy SimilarityMeasuresvoidsetAttribute(Long attribute) Importance of thedescriptionattribute in overall similarity.voidsetDescription(Long description) Importance of thedescriptionattribute in overall similarity.voidImportance of thenameattribute in overall similarity.voidImportance of thepriceattribute in overall similarity.voidsetVariantCount(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> TwithSimilarityMeasures(Function<SimilarityMeasures, T> helper) accessor map function
-
Method Details
-
getName
Long getName()Importance of the
nameattribute in overall similarity.- Returns:
- name
-
getDescription
Long getDescription()Importance of the
descriptionattribute in overall similarity.- Returns:
- description
-
getAttribute
Long getAttribute()Importance of the
descriptionattribute 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
priceattribute in overall similarity.- Returns:
- price
-
setName
Importance of the
nameattribute in overall similarity.- Parameters:
name- value to be set
-
setDescription
Importance of the
descriptionattribute in overall similarity.- Parameters:
description- value to be set
-
setAttribute
Importance of the
descriptionattribute 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
priceattribute 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
-