Interface FacetRange
- All Known Subinterfaces:
FacetResultRange
Example to create an instance using the builder pattern
FacetRange facetRange = FacetRange.builder()
.from(0.3)
.fromStr("{fromStr}")
.to(0.3)
.toStr("{toStr}")
.count(0.3)
.total(0.3)
.min(0.3)
.max(0.3)
.mean(0.3)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic FacetRangeBuilderbuilder()builder factory method for FacetRangestatic FacetRangeBuilderbuilder(FacetRange template) create builder for FacetRange instancecopyDeep()static FacetRangedeepCopy(FacetRange template) factory method to create a deep copy of FacetRange@NotNull LonggetCount()Number of ProductVariants for which the values in a field fall into the specified range.@NotNull DoublegetFrom()The range's lower endpoint.@NotNull StringThe range's lower endpoint.@NotNull DoublegetMax()Maximum value within the range.@NotNull DoublegetMean()Arithmetic mean of the values within the range.@NotNull DoublegetMin()Minimum value within the range.Number of Products for which the values in a field fall into the specified range.@NotNull DoublegetTo()The range's upper endpoint.@NotNull StringgetToStr()The range's upper endpoint.@NotNull DoublegetTotal()Sum of all values contained in the range.static FacetRangeof()factory methodstatic FacetRangeof(FacetRange template) factory method to create a shallow copy FacetRangevoidNumber of ProductVariants for which the values in a field fall into the specified range.voidThe range's lower endpoint.voidsetFromStr(String fromStr) The range's lower endpoint.voidMaximum value within the range.voidArithmetic mean of the values within the range.voidMinimum value within the range.voidsetProductCount(Long productCount) Number of Products for which the values in a field fall into the specified range.voidThe range's upper endpoint.voidThe range's upper endpoint.voidSum of all values contained in the range.static com.fasterxml.jackson.core.type.TypeReference<FacetRange>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithFacetRange(Function<FacetRange, T> helper) accessor map function
-
Method Details
-
getFrom
The range's lower endpoint.
0represents -∞.- Returns:
- from
-
getFromStr
The range's lower endpoint.
An empty string represents -∞.
- Returns:
- fromStr
-
getTo
The range's upper endpoint.
0represents +∞.- Returns:
- to
-
getToStr
The range's upper endpoint.
An empty string represents +∞.
- Returns:
- toStr
-
getCount
Number of ProductVariants for which the values in a field fall into the specified range.
- Returns:
- count
-
getProductCount
Long getProductCount()Number of Products for which the values in a field fall into the specified range.
Present only if the
counting productsextension is enabled.- Returns:
- productCount
-
getTotal
Sum of all values contained in the range.
- Returns:
- total
-
getMin
Minimum value within the range.
- Returns:
- min
-
getMax
Maximum value within the range.
- Returns:
- max
-
getMean
Arithmetic mean of the values within the range.
- Returns:
- mean
-
setFrom
The range's lower endpoint.
0represents -∞.- Parameters:
from- value to be set
-
setFromStr
The range's lower endpoint.
An empty string represents -∞.
- Parameters:
fromStr- value to be set
-
setTo
The range's upper endpoint.
0represents +∞.- Parameters:
to- value to be set
-
setToStr
The range's upper endpoint.
An empty string represents +∞.
- Parameters:
toStr- value to be set
-
setCount
Number of ProductVariants for which the values in a field fall into the specified range.
- Parameters:
count- value to be set
-
setProductCount
Number of Products for which the values in a field fall into the specified range.
Present only if the
counting productsextension is enabled.- Parameters:
productCount- value to be set
-
setTotal
Sum of all values contained in the range.
- Parameters:
total- value to be set
-
setMin
Minimum value within the range.
- Parameters:
min- value to be set
-
setMax
Maximum value within the range.
- Parameters:
max- value to be set
-
setMean
Arithmetic mean of the values within the range.
- Parameters:
mean- value to be set
-
of
factory method- Returns:
- instance of FacetRange
-
of
factory method to create a shallow copy FacetRange- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
FacetRange copyDeep() -
deepCopy
factory method to create a deep copy of FacetRange- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for FacetRange- Returns:
- builder
-
builder
create builder for FacetRange instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withFacetRange
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
-