Class ReplaceFunction


  • public class ReplaceFunction
    extends Object
    A mapping function to replace an AnalyticsValue from an AnalyticsValue or an AnalyticsValueStream with a different AnalyticsValue. For each document, all values from the base parameter matching the comparison parameter will be replaced with the fill parameter.

    The first parameter can be any type of analytics expression. If the parameter is multi-valued, then the return will be multi-valued. (Required)
    The second parameter, which is the value to compare to the first parameter, must be an AnalyticsValue, aka single-valued. (Required)
    The third parameter, which is the value to fill the first parameter with, must be an AnalyticsValue, aka single-valued. (Required)

    The resulting Value or ValueStream will be typed with the closest super-type of the three parameters. (e.g. "replace"(double,int,float) will return a double)