Class DefaultRangeNameProvider

    • Constructor Detail

      • DefaultRangeNameProvider

        public DefaultRangeNameProvider()
    • Method Detail

      • isRanged

        public boolean isRanged​(IndexedProperty property)
        Description copied from interface: RangeNameProvider
        Checks is an indexed property is ranged.
        Specified by:
        isRanged in interface RangeNameProvider
        Parameters:
        property - - the indexed property
        Returns:
        true if the indexed property is ranged, false otherwise
      • getValueRanges

        public java.util.List<ValueRange> getValueRanges​(IndexedProperty property,
                                                         java.lang.String qualifier)
        Description copied from interface: RangeNameProvider
        Returns the ranges associated with an indexed property that match a specific qualifier.
        Specified by:
        getValueRanges in interface RangeNameProvider
        Parameters:
        property - - the indexed property
        qualifier - - the qualifier used for matching
        Returns:
        the list of ranges
      • getRangeNameList

        public java.util.List<java.lang.String> getRangeNameList​(IndexedProperty property,
                                                                 java.lang.Object value)
                                                          throws FieldValueProviderException
        Description copied from interface: RangeNameProvider
        Resolves a list of range names for a specific value. For numerical types it allows open upper-limit range. If the property is not multiValue IndexedProperty.isMultiValue() only first matching range will be returned
        Specified by:
        getRangeNameList in interface RangeNameProvider
        Parameters:
        property - - the indexed property
        value - - the value for which the range names should be resolved
        Returns:
        the list of range names
        Throws:
        FieldValueProviderException - if it is not possible to resolve a range name for a specific value
      • getRangeNameList

        public java.util.List<java.lang.String> getRangeNameList​(IndexedProperty property,
                                                                 java.lang.Object value,
                                                                 java.lang.String qualifier)
                                                          throws FieldValueProviderException
        Description copied from interface: RangeNameProvider
        Resolves a list of range names for a specific value. For numerical types it allows open upper-limit range. If the property is not multiValue IndexedProperty.isMultiValue() only first matching range will be returned
        Specified by:
        getRangeNameList in interface RangeNameProvider
        Parameters:
        property - - the indexed property
        value - - the value for which the range names should be resolved
        qualifier - - the qualifier used for matching
        Returns:
        the list of range names
        Throws:
        FieldValueProviderException - if it is not possible to resolve a range name for a specific value
      • addValueRange

        protected void addValueRange​(java.util.List<java.lang.String> rangeNameList,
                                     IndexedProperty property,
                                     java.lang.Object value,
                                     ValueRange range)
      • isStringOrTextType

        protected boolean isStringOrTextType​(IndexedProperty property)
      • isDoubleType

        protected boolean isDoubleType​(IndexedProperty property)
      • isFloatType

        protected boolean isFloatType​(IndexedProperty property)
      • isIntegerType

        protected boolean isIntegerType​(IndexedProperty property)
      • valueOrDefault

        protected java.lang.Comparable valueOrDefault​(java.lang.Object value,
                                                      java.util.function.Function<java.lang.String,​java.lang.Comparable> valueFunction,
                                                      java.util.function.Supplier<java.lang.Comparable> defaultSupplier)