- java.lang.Object
-
- com.pervasive.datarush.functions.Formatting
-
public class Formatting extends Object
Provides implementations of common formatting functions. The format specification is defined byFormatter
.Reference the
Formatter
documentation for the capabilities and limitations of the formatting that is available. The format specification is not validated before being used. Therefore errors in the format specification are not discovered until execution.- See Also:
ScalarValuedFunction
,DeriveFields
-
-
Constructor Summary
Constructors Constructor Description Formatting()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ScalarValuedFunction
format(String format, ScalarValuedFunction... exprs)
Format output values of the given functions using the given format.static ScalarValuedFunction
format(String format, List<ScalarValuedFunction> exprs)
Format the output values of the given functions using the given format.static ScalarValuedFunction
formatValues(String format, String[] fieldNames)
Format values for the fields within a record token using the given format.
-
-
-
Method Detail
-
formatValues
public static ScalarValuedFunction formatValues(String format, String[] fieldNames)
Format values for the fields within a record token using the given format. The format must be valid for the types of the input fields.- Parameters:
format
- format specification indicating how to format the token valuesfieldNames
- names of the fields to supply to the formatter, order is relevant- Returns:
- a function that when applied formats input fields into a string using the given format
-
format
public static ScalarValuedFunction format(String format, ScalarValuedFunction... exprs)
Format output values of the given functions using the given format. The format must be valid for the types of the input fields.- Parameters:
format
- format specification indicating how to format the token valuesexprs
- functions providing outputs to be formatted- Returns:
- a function that when applied formats input fields into a string using the given format
-
format
public static ScalarValuedFunction format(String format, List<ScalarValuedFunction> exprs)
Format the output values of the given functions using the given format. The format must be valid for the types of the input fields.- Parameters:
format
- format specification indicating how to format the token valuesexprs
- functions providing outputs to be formatted- Returns:
- a function that when applied formats input fields into a string using the given format
-
-