A summary of the types of built-in functions is given below. Please see the JavaDocs for full details of the built-in functions and descriptions of their operation.
Type | Description |
Collection | Collection functions operate on Collections/Maps in one way or another. For each function there tends to be a number of overloaded version (different parameter list) to provide flexibility for the developer. Also, there may be versions that have differing names to allow for developer preference however they will operate the same. Typical collection operations are: collect - get a value from a list of objects and return them as a List, sort - sort a list of objects according to their "natural" ordering, unique - for a list of objects return the "unique" set. |
Conversion | Conversion functions convert data in one way or another, generally from one format to another. For each function there tends to be a number of overloaded version (different parameter list) to provide flexibility for the developer. Also, there may be versions that have differing names to allow for developer preference however they will operate the same. Typical conversion operations are: addTime - add an amount of time to a date and return the new Date, toNumber - convert a string to a number, upper - convert a string to uppercase. |
Formatting | Formatting functions format objects into a String version. For each function there tends to be a number of overloaded version (different parameter list) to provide flexibility for the developer. Also, there may be versions that have differing names to allow for developer preference however they will operate the same. Typical operations are: formatDate - format a date, formatNumber - format a number, formatTimeDuration - format a time duration. |
Grouping | Grouping functions perform some kind of grouping/aggregation on a collection/map. For each function there tends to be a number of overloaded version (different parameter list) to provide flexibility for the developer. Also, there may be versions that have differing names to allow for developer preference however they will operate the same. Typical grouping operations are: avg - determine the average value for the objects in a list, sum - sum the values in a list, concat - concatenate a number of strings together. |
String | String functions perform operations on strings in some way. Note: whilst the regexp and rgrep functions are available for use the relevant regular expression implementation must be available for use. Typical string operations are: grep - cycle over a file, line by line and determine if any of the lines contain the specified string, subStr - return a substring of another string, trim - trim whitespace from a string. |
Miscellaneous | Miscellaneous functions don't really have a place anywhere else yet. Over time they probably will have a home but for now they are lumped as "Miscellaneous". For each function there tends to be a number of overloaded version (different parameter list) to provide flexibility for the developer. Also, there may be versions that have differing names to allow for developer preference however they will operate the same. |