Class DecimalNumericConversionFunction
- java.lang.Object
-
- org.apache.solr.analytics.function.mapping.DecimalNumericConversionFunction
-
public class DecimalNumericConversionFunction extends Object
An abstract decimal numeric converting mapping function. For example "round()" would convert a float to an int and a double to a long.Takes a numeric Double or Float ValueStream or Value and returns a Long or Int ValueStream or Value, respectively.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DecimalNumericConversionFunction.CeilingFunction
A numeric mapping function that returns the ceiling of the input.static interface
DecimalNumericConversionFunction.ConvertDoubleFunction
static interface
DecimalNumericConversionFunction.ConvertFloatFunction
static class
DecimalNumericConversionFunction.FloorFunction
A numeric mapping function that returns the floor of the input.static class
DecimalNumericConversionFunction.RoundFunction
A numeric mapping function that returns the rounded input.
-
Constructor Summary
Constructors Constructor Description DecimalNumericConversionFunction()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LongValueStream
createDecimalConversionFunction(String name, DecimalNumericConversionFunction.ConvertFloatFunction fconv, DecimalNumericConversionFunction.ConvertDoubleFunction dconv, AnalyticsValueStream... params)
Create a numeric conversion mapping function.
-
-
-
Method Detail
-
createDecimalConversionFunction
public static LongValueStream createDecimalConversionFunction(String name, DecimalNumericConversionFunction.ConvertFloatFunction fconv, DecimalNumericConversionFunction.ConvertDoubleFunction dconv, AnalyticsValueStream... params)
Create a numeric conversion mapping function.- Parameters:
name
- the name of the functionfconv
- the method to convert floats to intsdconv
- the method to convert doubles to longsparams
- the parameters of the function- Returns:
- an instance of the conversion function using the given parameters.
-
-