Expression Language

Contents

Overview

The Data Pipeline Expression Language (DPEL) is similar to that found in the Java language. It contains a few additions that make it easier to read for developers and non-developers alike.

The DPEL engine is used by several endpoints to parse and evaluate expressions at runtime. This allows expressions to be treated as configuration instead of being baked into the application. DPEL expressions can be used to set calculated fields, filter records, and generate XML (XmlElement's when(), element(), and attribute() methods all accept dynamic expressions).

The DPEL engine can also be used apart from Data Pipeline as long as you don't mind working with internal classes that may change in the future (see com.northconcepts.datapipeline.internal.parser.Parser.parseExpression(String)).

 

Literals

Type Description Example
String Single or double quoted Java String "abcd"
'abcd'
Integer Java long 123
Decimal Java double 123.0
Date / Time date 'yyyy-MM-dd'
time 'HH:mm'
timestamp 'yyyy-MM-dd HH:mm'
date '2010-04-22'
time '01:54'
timestamp '2010-04-22 01:54'
Interval

A measure of time.


<integer> millisecond(s) | second(s) | minute(s) | hour(s) | day(s) | week(s) | month(s) | year(s)

1 millisecond
2 milliseconds
base + 2 weeks
date '2010-04-22' + 5 days
date '2010-04-22' - start > 2 months
Boolean Java boolean: true, false, yes, or no completed == false
started == yes
Null Java null null

Variables

Type Description Example
Simple Case-sensitive identifier, beginning with a letter or underscore followed by zero or more letters, numbers, underscores, and periods. invoiceDate
invoice_date
Explicit A simple variable or variable containing spaces surrounded by ${ and }. ${invoiceDate}
${Invoice Date}
Positional A variable defined by position or context. Currently unused. ?

Arithmetic Operators

Type Description Example
Unary Plus   +a
Unary Minus   -a
-(a + b)
Exponent base ** exponent a ** b
2 ** 4
Multiplication   33 * 2
Divide   100 / 5
Remainder   78 % 5
78 mod 5
Addition Numeric addition or string concatenation 4 + 3
"abc" + 'def'
Subtraction   25.7 - 95.42

Relational Operators

Type Description Example
Equals = or == 1 = 1
1 == 1
true == yes
Not Equals != or <> a != b
a <> b
Greater > a > b
Greater or Equal >= a >= b
Less < a < b
Less or Equal <= a <= b

Logical Operators

Type Description Example
And and or && a && b
a and b
Or or or || a || b
a or b
Xor xor or ^ a ^ b
a xor b
Not not or ! !(a > 7)
not (a > 7)

Method Calls

The expression language supports calls to user-defined, static Java methods. Methods can be called either using their fully-qualified Java name or by an alias. See the add my own function example for a demo that registers and calls a function alias.




Blacklisted Methods

DPEL contains a set of blacklisted methods we think are unsafe from a security point-of-view. Trying to execute them in an expression will fail with an exception.

This behavior can be overridden by explicitly whitelisting any methods, classes, or packages you wish to call using Functions.addWhitelistPrefix(String...). You can also blacklist additional methods using Functions.addBlacklistPrefix(String...) before executing your expression.

Blacklisting and whitelisting work by examining the prefix of the fully-qualified method being called. For example, java.lang.Runtime.exit(int) will not execute because it starts with "java.lang.Runtime".

Here is the list of blacklisted method prefixes in DPEL:

  1. java.awt.Robot
  2. java.beans
  3. java.io
  4. java.lang.System
  5. java.lang.Runtime
  6. java.lang.Class
  7. java.lang.ClassLoader
  8. java.lang.Compiler
  9. java.lang.Thread
  10. java.lang.management.
  11. java.lang.reflect
  12. java.net
  13. java.rmi
  14. javax.management
  15. javax.script
  16. sun

See the Blacklist and Whitelist Functions in DP Expression Language example for a demo to blacklist or whitelist a class or package.




Examples

The following examples all use the built-in expression language.




Built-in Functions by Category

Conversion

  1. bytesToHex(byte[] bytes)Converts an array of bytes to a hexadecimal string.
  2. columnNameToInt(String columnName)Converts a string column name to an int. (e.g., column A = 0, column CW = 100, column AB = 27)
  3. dayOfMonth(Date date)Returns a number representing the day of the month (1–31) of the input date or null if the specified date is null.
  4. dayOfWeek(Date date)Returns a number representing the day of the week (0–6, Sunday is 0) of the input date or null if the specified date is null.
  5. dayOfYear(Date date)Returns a number representing the day of the year (1–366) of the input date or null if the specified date is null.
  6. daysToDate(Number number)Returns a Date by converting the given number as days.
  7. daysToDateTime(Number number)Returns a Date that has the given Number input set as the time in days
  8. formatDate(Date date, String pattern)Converts a java.util.Date to a string using the specified format pattern.
  9. formatDouble(Double number, String pattern)Converts a Double to a string using the specified format pattern.
  10. formatLong(Long number, String pattern)Converts a Long to a string using the specified format pattern.
  11. formatNumber(Number number, String pattern)Converts a Number to a string using the specified format pattern.
  12. getField(Record record, int fieldIndex)Returns the field value in the specified records by index.
  13. getField(Record record, String fieldName)Returns the field value in the specified records by name.
  14. hour(Date date)Returns a number representing the hour of the day of the input date or null if the specified date is null.
  15. hoursToDate(Number number)Returns a Date by converting the given number as hours.
  16. hoursToDateTime(Number number)Returns a Date that has the given Number input set as the time in hours
  17. intToColumnName(int column)Converts an int to a string column name. Similar to spreadsheet column names. (e.g., column 27 = AB, column 100 = CW, column 0 = A)
  18. intervalToMilliseconds(Interval interval)Returns a Date by converting the given number as days.
  19. intervalToMonths(Interval interval)Returns a Date by converting the given number as days.
  20. intervalToSeconds(Interval interval)Returns a Date by converting the given number as days.
  21. intervalToYears(Interval interval)Returns a Date by converting the given number as days.
  22. lookup(Lookup lookupSource, Object ... lookupKeys)Returns the first record found (or null) after performing a lookup using the specified source and keys.
  23. lookup(int fieldIndex, Lookup lookupSource, Object ... lookupKeys)Performs a lookup using the specified source and keys and returns the field value by index in the first record found (or null).
  24. lookup(String fieldName, Lookup lookupSource, Object ... lookupKeys)Performs a lookup using the specified source and keys and returns the field value by name in the first record found (or null).
  25. millisecond(Date date)Returns a number representing the millisecond within the second of the input date or null if the specified date is null.
  26. millisecondsToDate(Number number)Returns a Date by converting the given number as milliseconds.
  27. millisecondsToDateTime(Number number)Returns a Date that has the given Number input set as the time in milliseconds
  28. minute(Date date)Returns a number representing the minute within the hour of the input date or null if the specified date is null.
  29. minutesToDate(Number number)Returns a Date by converting the given number as minutes.
  30. minutesToDateTime(Number number)Returns a Date that has the given Number input set as the time in minutes
  31. month(Date date)Returns the date's month (1-12) or null if the specified date is null.
  32. parseBigDecimal(String s)Returns a BigDecimal initialized to the value of the specified string.
  33. parseBigInteger(String s)Returns a BigInteger initialized to the value of the specified string.
  34. parseBoolean(String s)Returns a boolean initialized to the value of the specified string.
  35. parseByte(String s)Returns a byte initialized to the value of the specified string.
  36. parseDate(String value, String pattern)Converts a string to a java.util.Date using the specified pattern.
  37. parseDouble(String s)Returns a double initialized to the value of the specified string.
  38. parseDouble(String number, String pattern)Converts a string to a double using the specified format pattern.
  39. parseFloat(String s)Returns a float initialized to the value of the specified string.
  40. parseInt(String s)Returns an int initialized to the value of the specified string.
  41. parseLong(String s)Returns a long initialized to the value of the specified string.
  42. parseLong(String number, String pattern)Converts a string to a long using the specified format pattern.
  43. parseShort(String s)Returns a short initialized to the value of the specified string.
  44. second(Date date)Returns a number representing the second within the minute of the input date or null if the specified date is null.
  45. secondsToDate(Number number)Returns a Date by converting the given number as seconds.
  46. secondsToDateTime(Number number)Returns a Date that has the given Number input set as the time in seconds
  47. toBigDecimal(Object value)Converts value to a BigDecimal. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
  48. toBigInteger(Object value)Converts value to a BigInteger. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
  49. toBoolean(Object value)Converts value to a Boolean.
  50. toByte(Object value)Converts value to a byte. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
  51. toDate(Date value)Converts value to a java.sql.Date.
  52. toDatetime(Date value)Converts value to a java.util.Date.
  53. toDouble(Object value)Converts value to a Double. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
  54. toFloat(Object value)Converts value to a float. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
  55. toInt(Object value)Converts value to an Integer. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
  56. toLong(Object value)Converts value to a Long. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
  57. toShort(Object value)Converts value to a short. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
  58. toTime(Date value)Converts value to a java.sql.Time.
  59. weekOfYear(Date date)Returns a number representing the week of the year (0–53) of the input date or null if the specified date is null.
  60. year(Date date)Returns the date's year or null if the specified date is null.

Datetime

  1. currentTimeMillis()Returns the current time in milliseconds since midnight, January 1, 1970 UTC.
  2. dayOfMonth(Date date)Returns a number representing the day of the month (1–31) of the input date or null if the specified date is null.
  3. dayOfWeek(Date date)Returns a number representing the day of the week (0–6, Sunday is 0) of the input date or null if the specified date is null.
  4. dayOfYear(Date date)Returns a number representing the day of the year (1–366) of the input date or null if the specified date is null.
  5. daysToDate(Number number)Returns a Date by converting the given number as days.
  6. daysToDateTime(Number number)Returns a Date that has the given Number input set as the time in days
  7. formatDate(Date date, String pattern)Converts a java.util.Date to a string using the specified format pattern.
  8. hour(Date date)Returns a number representing the hour of the day of the input date or null if the specified date is null.
  9. hoursToDate(Number number)Returns a Date by converting the given number as hours.
  10. hoursToDateTime(Number number)Returns a Date that has the given Number input set as the time in hours
  11. intervalToMilliseconds(Interval interval)Returns a Date by converting the given number as days.
  12. intervalToMonths(Interval interval)Returns a Date by converting the given number as days.
  13. intervalToSeconds(Interval interval)Returns a Date by converting the given number as days.
  14. intervalToYears(Interval interval)Returns a Date by converting the given number as days.
  15. millisecond(Date date)Returns a number representing the millisecond within the second of the input date or null if the specified date is null.
  16. millisecondsToDate(Number number)Returns a Date by converting the given number as milliseconds.
  17. millisecondsToDateTime(Number number)Returns a Date that has the given Number input set as the time in milliseconds
  18. minute(Date date)Returns a number representing the minute within the hour of the input date or null if the specified date is null.
  19. minutesToDate(Number number)Returns a Date by converting the given number as minutes.
  20. minutesToDateTime(Number number)Returns a Date that has the given Number input set as the time in minutes
  21. month(Date date)Returns the date's month (1-12) or null if the specified date is null.
  22. nanoTime()Returns the current value of the high-resolution time source in nanoseconds.
  23. now()Returns the current date-time.
  24. parseDate(String value, String pattern)Converts a string to a java.util.Date using the specified pattern.
  25. second(Date date)Returns a number representing the second within the minute of the input date or null if the specified date is null.
  26. secondsToDate(Number number)Returns a Date by converting the given number as seconds.
  27. secondsToDateTime(Number number)Returns a Date that has the given Number input set as the time in seconds
  28. toDate(Date value)Converts value to a java.sql.Date.
  29. toDatetime(Date value)Converts value to a java.util.Date.
  30. toTime(Date value)Converts value to a java.sql.Time.
  31. weekOfYear(Date date)Returns a number representing the week of the year (0–53) of the input date or null if the specified date is null.
  32. year(Date date)Returns the date's year or null if the specified date is null.

Io

  1. print(Object value)Writes a value to the console.
  2. println()Writes a new line to the console.
  3. println(Object value)Writes a value followed by a new line to the console.

Logical

  1. coalesce(Object ... expression)Returns the first non-null expression or null if all expressions are null.
  2. compare(Object o1, Object o2)Compares two Objects. Returns 0 if both objects are equal, -1 if the first object is null, 1 if the second object in null.
  3. compare(String s1, String s2, boolean caseSensitive)Compares two string if they are equal. If caseSensitive is true, it matches the exact case. A value of 0 is returned if the strings are equal, -1 if the first string is null, 1 if the second string is null.
  4. decode(Object expression, Object search1, Object result1, Object ... searchResultDefault)Returns result1 if expression equals search1. Otherwise expression is matched against searchResultDefault and the result is the next Object in the array (i.e., the array are search pairs of search and result objects).
  5. equals(Object expression1, Object expression2)Returns true if both Objects are equal.
  6. iif(boolean booleanExpression, Object trueResult, Object falseResult)Returns trueResult if booleanExpression is true, otherwise returns falseResult.
  7. isOneOf(int actual, int ... expected)Returns true if actual equals one of the integers in expected.
  8. isOneOf(Object actual, Object ... expected)Returns true if actual equals one of the objects in expected.
  9. matches(String s1, String s2, boolean caseSensitive, boolean allowEmpty)Returns true if both strings match. If caseSensitive is true, it will match the exact case. If allowEmpty is true, it will allow matching with an empty string.
  10. matches(String s1, String s2, boolean caseSensitive)Returns true if both strings match. If caseSensitive is true, it will match the exact case.
  11. matches(String s1, String s2)Returns true if both strings match.
  12. nullif(Object expression1, Object expression2)Returns null if the two expressions are equal, otherwise returns expression1.
  13. parseBoolean(String s)Returns a boolean initialized to the value of the specified string.
  14. toBoolean(Object value)Converts value to a Boolean.

Math

  1. abs(int a)Returns the absolute value of a number.
  2. abs(long a)Returns the absolute value of a number.
  3. abs(double a)Returns the absolute value of a number.
  4. abs(BigInteger a)Returns the absolute value of a number.
  5. abs(BigDecimal a)Returns the absolute value of a number.
  6. acos(double a)Returns the arc cosine of a double.
  7. asin(double a)Returns the arc sine of a double.
  8. atan(double a)Returns the arc tangent of a double.
  9. cbrt(double a)Returns the cube root of a double value.
  10. ceil(double a)Returns the smallest value that is greater or equal to the parameter value.
  11. cos(double a)Returns the cosine of a double.
  12. cosh(double a)Returns the hyberbolic cosine value of the parameter.
  13. floor(double a)Returns the largest value that is lesser or equal to the parameter value.
  14. hypot(double a, double b)Returns the sqrt(a2 + b2) value of the parameters.
  15. log(double a)Returns the natural logarithm of a double value.
  16. log10(double a)Returns the base 10 logarithm of a double value.
  17. max(int a, int ... b)Returns the largest number of a set of numbers.
  18. max(long a, long ... b)Returns the largest number of a set of numbers.
  19. max(double a, double ... b)Returns the largest number of a set of numbers.
  20. max(BigDecimal a, BigDecimal ... b)Returns the largest number of a set of numbers.
  21. max(BigInteger a, BigInteger ... b)Returns the largest number of a set of numbers.
  22. min(int a, int ... b)Returns the smallest number of a set of numbers.
  23. min(long a, long ... b)Returns the smallest number of a set of numbers.
  24. min(double a, double ... b)Returns the smallest number from a set of numbers.
  25. min(BigDecimal a, BigDecimal ... b)Returns the smallest number from a set of numbers.
  26. min(BigInteger a, BigInteger ... b)Returns the smallest number from a set of numbers.
  27. random()Returns a pseudorandomly chosen value between 0.0,and 1.0
  28. rint(double a)Returns a value that is equal to a mathematical integer closest in value to the parameter.
  29. round(double a)Returns a long value closest to the parameter
  30. round(Number number, int decimalPlaces)Returns a Number scaled according to the specified decimal places using RoundingMode.HALF_UP.
  31. signum(int a)Returns the signum function value of the parameter.
  32. signum(long a)Returns the signum function value of the parameter.
  33. signum(double a)Returns the signum function value of the parameter.
  34. signum(BigInteger a)Returns the signum function value of the parameter.
  35. signum(BigDecimal a)Returns the signum function value of the parameter.
  36. sin(double a)Returns the sine of a double.
  37. sinh(double a)Returns the hyberbolic sine value of the parameter.
  38. sqrt(double a)Returns the square root of a double value.
  39. tan(double a)Returns the tangent of a double.
  40. tanh(double a)Returns the hyberbolic tangent value of the parameter.
  41. toDegrees(double a)Returns the approximate degrees equivalent value of an angle measured in radians.
  42. toRadians(double a)Returns the approximate radians equivalent value of an angle measured in degrees.

Numeric

  1. columnNameToInt(String columnName)Converts a string column name to an int. (e.g., column A = 0, column CW = 100, column AB = 27)
  2. formatDouble(Double number, String pattern)Converts a Double to a string using the specified format pattern.
  3. formatLong(Long number, String pattern)Converts a Long to a string using the specified format pattern.
  4. formatNumber(Number number, String pattern)Converts a Number to a string using the specified format pattern.
  5. intToColumnName(int column)Converts an int to a string column name. Similar to spreadsheet column names. (e.g., column 27 = AB, column 100 = CW, column 0 = A)
  6. parseBigDecimal(String s)Returns a BigDecimal initialized to the value of the specified string.
  7. parseBigInteger(String s)Returns a BigInteger initialized to the value of the specified string.
  8. parseByte(String s)Returns a byte initialized to the value of the specified string.
  9. parseDouble(String s)Returns a double initialized to the value of the specified string.
  10. parseDouble(String number, String pattern)Converts a string to a double using the specified format pattern.
  11. parseFloat(String s)Returns a float initialized to the value of the specified string.
  12. parseInt(String s)Returns an int initialized to the value of the specified string.
  13. parseLong(String s)Returns a long initialized to the value of the specified string.
  14. parseLong(String number, String pattern)Converts a string to a long using the specified format pattern.
  15. parseShort(String s)Returns a short initialized to the value of the specified string.
  16. toBigDecimal(Object value)Converts value to a BigDecimal. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
  17. toBigInteger(Object value)Converts value to a BigInteger. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
  18. toByte(Object value)Converts value to a byte. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
  19. toDouble(Object value)Converts value to a Double. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
  20. toFloat(Object value)Converts value to a float. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
  21. toInt(Object value)Converts value to an Integer. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
  22. toLong(Object value)Converts value to a Long. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
  23. toShort(Object value)Converts value to a short. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.

Record

  1. getField(Record record, int fieldIndex)Returns the field value in the specified records by index.
  2. getField(Record record, String fieldName)Returns the field value in the specified records by name.
  3. lookup(Lookup lookupSource, Object ... lookupKeys)Returns the first record found (or null) after performing a lookup using the specified source and keys.
  4. lookup(int fieldIndex, Lookup lookupSource, Object ... lookupKeys)Performs a lookup using the specified source and keys and returns the field value by index in the first record found (or null).
  5. lookup(String fieldName, Lookup lookupSource, Object ... lookupKeys)Performs a lookup using the specified source and keys and returns the field value by name in the first record found (or null).

Security

  1. md5(Object ... values)Applies the MD5 message digest algorithm to values and returns it as a string.
  2. sha256(Object ... values)Applies the SHA-256 message digest algorithm to values and returns it as a string.
  3. sha512(Object ... values)Applies the SHA-512 message digest algorithm to values and returns it as a string.

String

  1. arrayToString(Object[] array, String separator)Convert an array of Objects to a String separated by the separator.
  2. arrayToString(int[] array, String separator)Convert an int array to a String separated by the separator.
  3. arrayToString(long[] array, String separator)Convert a long array to a String separated by the separator.
  4. arrayToString(double[] array, String separator)Convert a double array to a String separated by the separator.
  5. arrayToString(List array, String separator)Convert a List<?> to a String separated by the separator.
  6. bytesToHex(byte[] bytes)Converts an array of bytes to a hexadecimal string.
  7. capitalize(String value)Capitalizes a string by changing the first letter to upper case. No other letters are changed.
  8. columnNameToInt(String columnName)Converts a string column name to an int. (e.g., column A = 0, column CW = 100, column AB = 27)
  9. compare(String s1, String s2, boolean caseSensitive)Compares two string if they are equal. If caseSensitive is true, it matches the exact case. A value of 0 is returned if the strings are equal, -1 if the first string is null, 1 if the second string is null.
  10. contains(String string, String substring)Returns true if the string contains the substring. It will match the exact case.
  11. contains(String string, String substring, boolean caseSensitive)Returns true if the string contains the substring. If caseSensitive is true, it will match the exact case.
  12. contains(String[] elements, String element, boolean caseSensitive)Returns true if the string element is contained in the array of string elements. If caseSensitive is true, it will match the exact case.
  13. countDigits(String string)Counts the number of digits in a string.
  14. countLetters(String string)Counts the number of letters in a string.
  15. countLowercaseLetters(String string)Counts the number of lowercase letters in a String.
  16. countSymbols(String string)Counts the number of symbols in a string.
  17. countUppercaseLetters(String string)Counts the number of uppercase letters in a String.
  18. deleteString(int start, int end, String value)Returns a copy of the string with the characters deleted from the specified start and end indexes
  19. emptyToNull(String s)Returns null if the string is empty. Otherwise, the same string is returned.
  20. endsWith(String string, String substring, boolean caseSensitive)Returns true if the string ends with the substring. If caseSensitive is true, it will match the exact case.
  21. endsWith(CharSequence string, CharSequence substring)Returns true if the string ends with the substring.
  22. formatDate(Date date, String pattern)Converts a java.util.Date to a string using the specified format pattern.
  23. formatDouble(Double number, String pattern)Converts a Double to a string using the specified format pattern.
  24. formatLong(Long number, String pattern)Converts a Long to a string using the specified format pattern.
  25. formatNumber(Number number, String pattern)Converts a Number to a string using the specified format pattern.
  26. getCharacterCount(String string, char searchChar)Returns the number of searchChars contained in string or zero (0).
  27. getRandomString(int length)Returns a random string with the specified length.
  28. indexOf(String string, String substring, boolean caseSensitive)Returns the position of the substring within the string or -1. If caseSensitive is true, it will match the exact case.
  29. insertString(int index, String orignalString, String stringToInsert)Returns a copy of the original string with the second string parameter inserted at the specified index.
  30. intToColumnName(int column)Converts an int to a string column name. Similar to spreadsheet column names. (e.g., column 27 = AB, column 100 = CW, column 0 = A)
  31. isEmpty(String s)Return true if the string is empty, null or all whitespaces.
  32. isNotEmpty(String s)Return true if the string is not empty or is not null.
  33. join(String separator, String ... elements)Returns a String composed of the elements joined by the separator.
  34. left(String string, int length)Returns the substring of string starting from the left until the specified length.
  35. length(Object value)Returns the length of value.
  36. matches(String s1, String s2, boolean caseSensitive, boolean allowEmpty)Returns true if both strings match. If caseSensitive is true, it will match the exact case. If allowEmpty is true, it will allow matching with an empty string.
  37. matches(String s1, String s2, boolean caseSensitive)Returns true if both strings match. If caseSensitive is true, it will match the exact case.
  38. matches(String s1, String s2)Returns true if both strings match.
  39. matchesRegex(String string, String regex)Returns true if the provided string matches the given regular expression.
  40. matchesRegex(String string, String regex, boolean ignoreCase, boolean dotAll, boolean multiLine)Returns true if the provided string matches the regular expression using the given flags.
  41. padLeft(String string, int length, char padChar)Pads the number of characters specified on the left of the string, length is the resulting size of the string with padding.
  42. padRight(String string, int length, char padChar)Pads the number of characters specified on the right of the string, length is the resulting size of the string with padding.
  43. parseBigDecimal(String s)Returns a BigDecimal initialized to the value of the specified string.
  44. parseBigInteger(String s)Returns a BigInteger initialized to the value of the specified string.
  45. parseBoolean(String s)Returns a boolean initialized to the value of the specified string.
  46. parseByte(String s)Returns a byte initialized to the value of the specified string.
  47. parseDate(String value, String pattern)Converts a string to a java.util.Date using the specified pattern.
  48. parseDouble(String s)Returns a double initialized to the value of the specified string.
  49. parseDouble(String number, String pattern)Converts a string to a double using the specified format pattern.
  50. parseFloat(String s)Returns a float initialized to the value of the specified string.
  51. parseInt(String s)Returns an int initialized to the value of the specified string.
  52. parseLong(String s)Returns a long initialized to the value of the specified string.
  53. parseLong(String number, String pattern)Converts a string to a long using the specified format pattern.
  54. parseShort(String s)Returns a short initialized to the value of the specified string.
  55. repeat(String string, int count)Creates a new string out of the string provided, appended count times.
  56. replaceAllRegex(String orignalString, CharSequence regex, CharSequence replacement)Returns a new string where all substring occurrences that matches the given regular expression has been replaced by the given replacement.
  57. replaceChar(String original, char oldChar, char newChar)Returns a new string where all the occurrences of the oldChar has been replaced by the newChar
  58. replaceFirstRegex(String orignalString, CharSequence regex, CharSequence replacement)Returns a new string where the first occurrence of the substring that matches the given regular expression has been replaced by the given replacement.
  59. replaceString(String orignalString, CharSequence oldString, CharSequence newString)Returns a new string where all the occurrences of the oldChar has been replaced by the newChar
  60. replaceSubstring(int start, int end, String original, String replacement)Returns a copy of the string with the characters replaced by the given replacement from the specified start and end indexes
  61. reverse(String a)Returns the reverse sequence of the input String.
  62. right(String string, int length)Returns the substring of string starting from the right until the specified length.
  63. split(String string, String regex, int limit)Returns an array of String split around the given regular expression.
  64. split(String string, String regex)Returns an array of String split around the given regular expression.
  65. startsWith(String string, String substring, boolean caseSensitive)Returns true if the string starts with substring. If caseSensitive is true, it will match the exact case.
  66. startsWith(CharSequence string, CharSequence substring)Returns true if the string starts with substring.
  67. startsWith(CharSequence string, CharSequence substring, int offset)Returns true if the string starts with substring. If offset is set, it will start matching the substring at that point in the string.
  68. substring(String string, int beginIndex, int endIndex)Returns the substring of string starting from the beginIndex until one before the endIndex. An empty is returned if either index is greater than the length of the string.
  69. swapCase(String value)Toggles the case of a string by changing upper to lower case and lower case to upper case.
  70. toLowerCase(Object value)Converts all the characters in value to lowercase.
  71. toLowerCaseFirstChar(String value)Returns a copy string with the first letter in lower case.
  72. toUpperCase(Object value)Converts all the characters in value to uppercase.
  73. toUpperCaseFirstChar(String value)Returns a copy of the string with the first letter in upper case.
  74. trim(String value)Returns a copy of the string where the leading and trailing whitepsaces removed.
  75. trimFrom(String string, String substring)Removes the first instance of the substring and all characters after it.
  76. trimLeft(String string)Removes all leading whitespace.
  77. trimLeft(String string, char padChar)Removes all leading characters specified. If padChar is not specified, whitespace is removed.
  78. trimRight(String string)Removes all trailing whitespace.
  79. trimRight(String string, char padChar)Removes all trailing characters specified. If padChar is not specified, whitespace is removed.
  80. trimTo(String string, String substring)Removes all characters up to and including the first instance of the substring.
  81. uncapitalize(String value)Removes capitalization from a string by changing the first letter to lower case. No other letters are changed.



Built-in Functions Index

abs(int a) Returns the absolute value of a number.
abs(long a) Returns the absolute value of a number.
abs(double a) Returns the absolute value of a number.
abs(BigInteger a) Returns the absolute value of a number.
abs(BigDecimal a) Returns the absolute value of a number.
acos(double a) Returns the arc cosine of a double.
arrayToString(Object[] array, String separator) Convert an array of Objects to a String separated by the separator.
arrayToString(int[] array, String separator) Convert an int array to a String separated by the separator.
arrayToString(long[] array, String separator) Convert a long array to a String separated by the separator.
arrayToString(double[] array, String separator) Convert a double array to a String separated by the separator.
arrayToString(List array, String separator) Convert a List<?> to a String separated by the separator.
asin(double a) Returns the arc sine of a double.
atan(double a) Returns the arc tangent of a double.
bytesToHex(byte[] bytes) Converts an array of bytes to a hexadecimal string.
capitalize(String value) Capitalizes a string by changing the first letter to upper case. No other letters are changed.
cbrt(double a) Returns the cube root of a double value.
ceil(double a) Returns the smallest value that is greater or equal to the parameter value.
coalesce(Object ... expression) Returns the first non-null expression or null if all expressions are null.
columnNameToInt(String columnName) Converts a string column name to an int. (e.g., column A = 0, column CW = 100, column AB = 27)
compare(Object o1, Object o2) Compares two Objects. Returns 0 if both objects are equal, -1 if the first object is null, 1 if the second object in null.
compare(String s1, String s2, boolean caseSensitive) Compares two string if they are equal. If caseSensitive is true, it matches the exact case. A value of 0 is returned if the strings are equal, -1 if the first string is null, 1 if the second string is null.
contains(String string, String substring) Returns true if the string contains the substring. It will match the exact case.
contains(String string, String substring, boolean caseSensitive) Returns true if the string contains the substring. If caseSensitive is true, it will match the exact case.
contains(String[] elements, String element, boolean caseSensitive) Returns true if the string element is contained in the array of string elements. If caseSensitive is true, it will match the exact case.
cos(double a) Returns the cosine of a double.
cosh(double a) Returns the hyberbolic cosine value of the parameter.
countDigits(String string) Counts the number of digits in a string.
countLetters(String string) Counts the number of letters in a string.
countLowercaseLetters(String string) Counts the number of lowercase letters in a String.
countSymbols(String string) Counts the number of symbols in a string.
countUppercaseLetters(String string) Counts the number of uppercase letters in a String.
currentTimeMillis() Returns the current time in milliseconds since midnight, January 1, 1970 UTC.
dayOfMonth(Date date) Returns a number representing the day of the month (1–31) of the input date or null if the specified date is null.
dayOfWeek(Date date) Returns a number representing the day of the week (0–6, Sunday is 0) of the input date or null if the specified date is null.
dayOfYear(Date date) Returns a number representing the day of the year (1–366) of the input date or null if the specified date is null.
daysToDate(Number number) Returns a Date by converting the given number as days.
daysToDateTime(Number number) Returns a Date that has the given Number input set as the time in days
decode(Object expression, Object search1, Object result1, Object ... searchResultDefault) Returns result1 if expression equals search1. Otherwise expression is matched against searchResultDefault and the result is the next Object in the array (i.e., the array are search pairs of search and result objects).
deleteString(int start, int end, String value) Returns a copy of the string with the characters deleted from the specified start and end indexes
emptyToNull(String s) Returns null if the string is empty. Otherwise, the same string is returned.
endsWith(String string, String substring, boolean caseSensitive) Returns true if the string ends with the substring. If caseSensitive is true, it will match the exact case.
endsWith(CharSequence string, CharSequence substring) Returns true if the string ends with the substring.
equals(Object expression1, Object expression2) Returns true if both Objects are equal.
floor(double a) Returns the largest value that is lesser or equal to the parameter value.
formatDate(Date date, String pattern) Converts a java.util.Date to a string using the specified format pattern.
formatDouble(Double number, String pattern) Converts a Double to a string using the specified format pattern.
formatLong(Long number, String pattern) Converts a Long to a string using the specified format pattern.
formatNumber(Number number, String pattern) Converts a Number to a string using the specified format pattern.
getCharacterCount(String string, char searchChar) Returns the number of searchChars contained in string or zero (0).
getField(Record record, int fieldIndex) Returns the field value in the specified records by index.
getField(Record record, String fieldName) Returns the field value in the specified records by name.
getRandomString(int length) Returns a random string with the specified length.
hour(Date date) Returns a number representing the hour of the day of the input date or null if the specified date is null.
hoursToDate(Number number) Returns a Date by converting the given number as hours.
hoursToDateTime(Number number) Returns a Date that has the given Number input set as the time in hours
hypot(double a, double b) Returns the sqrt(a2 + b2) value of the parameters.
iif(boolean booleanExpression, Object trueResult, Object falseResult) Returns trueResult if booleanExpression is true, otherwise returns falseResult.
indexOf(String string, String substring, boolean caseSensitive) Returns the position of the substring within the string or -1. If caseSensitive is true, it will match the exact case.
insertString(int index, String orignalString, String stringToInsert) Returns a copy of the original string with the second string parameter inserted at the specified index.
intToColumnName(int column) Converts an int to a string column name. Similar to spreadsheet column names. (e.g., column 27 = AB, column 100 = CW, column 0 = A)
intervalToMilliseconds(Interval interval) Returns a Date by converting the given number as days.
intervalToMonths(Interval interval) Returns a Date by converting the given number as days.
intervalToSeconds(Interval interval) Returns a Date by converting the given number as days.
intervalToYears(Interval interval) Returns a Date by converting the given number as days.
isEmpty(String s) Return true if the string is empty, null or all whitespaces.
isNotEmpty(String s) Return true if the string is not empty or is not null.
isOneOf(int actual, int ... expected) Returns true if actual equals one of the integers in expected.
isOneOf(Object actual, Object ... expected) Returns true if actual equals one of the objects in expected.
join(String separator, String ... elements) Returns a String composed of the elements joined by the separator.
left(String string, int length) Returns the substring of string starting from the left until the specified length.
length(Object value) Returns the length of value.
log(double a) Returns the natural logarithm of a double value.
log10(double a) Returns the base 10 logarithm of a double value.
lookup(Lookup lookupSource, Object ... lookupKeys) Returns the first record found (or null) after performing a lookup using the specified source and keys.
lookup(int fieldIndex, Lookup lookupSource, Object ... lookupKeys) Performs a lookup using the specified source and keys and returns the field value by index in the first record found (or null).
lookup(String fieldName, Lookup lookupSource, Object ... lookupKeys) Performs a lookup using the specified source and keys and returns the field value by name in the first record found (or null).
matches(String s1, String s2, boolean caseSensitive, boolean allowEmpty) Returns true if both strings match. If caseSensitive is true, it will match the exact case. If allowEmpty is true, it will allow matching with an empty string.
matches(String s1, String s2, boolean caseSensitive) Returns true if both strings match. If caseSensitive is true, it will match the exact case.
matches(String s1, String s2) Returns true if both strings match.
matchesRegex(String string, String regex) Returns true if the provided string matches the given regular expression.
matchesRegex(String string, String regex, boolean ignoreCase, boolean dotAll, boolean multiLine) Returns true if the provided string matches the regular expression using the given flags.
max(int a, int ... b) Returns the largest number of a set of numbers.
max(long a, long ... b) Returns the largest number of a set of numbers.
max(double a, double ... b) Returns the largest number of a set of numbers.
max(BigDecimal a, BigDecimal ... b) Returns the largest number of a set of numbers.
max(BigInteger a, BigInteger ... b) Returns the largest number of a set of numbers.
md5(Object ... values) Applies the MD5 message digest algorithm to values and returns it as a string.
millisecond(Date date) Returns a number representing the millisecond within the second of the input date or null if the specified date is null.
millisecondsToDate(Number number) Returns a Date by converting the given number as milliseconds.
millisecondsToDateTime(Number number) Returns a Date that has the given Number input set as the time in milliseconds
min(int a, int ... b) Returns the smallest number of a set of numbers.
min(long a, long ... b) Returns the smallest number of a set of numbers.
min(double a, double ... b) Returns the smallest number from a set of numbers.
min(BigDecimal a, BigDecimal ... b) Returns the smallest number from a set of numbers.
min(BigInteger a, BigInteger ... b) Returns the smallest number from a set of numbers.
minute(Date date) Returns a number representing the minute within the hour of the input date or null if the specified date is null.
minutesToDate(Number number) Returns a Date by converting the given number as minutes.
minutesToDateTime(Number number) Returns a Date that has the given Number input set as the time in minutes
month(Date date) Returns the date's month (1-12) or null if the specified date is null.
nanoTime() Returns the current value of the high-resolution time source in nanoseconds.
now() Returns the current date-time.
nullif(Object expression1, Object expression2) Returns null if the two expressions are equal, otherwise returns expression1.
padLeft(String string, int length, char padChar) Pads the number of characters specified on the left of the string, length is the resulting size of the string with padding.
padRight(String string, int length, char padChar) Pads the number of characters specified on the right of the string, length is the resulting size of the string with padding.
parseBigDecimal(String s) Returns a BigDecimal initialized to the value of the specified string.
parseBigInteger(String s) Returns a BigInteger initialized to the value of the specified string.
parseBoolean(String s) Returns a boolean initialized to the value of the specified string.
parseByte(String s) Returns a byte initialized to the value of the specified string.
parseDate(String value, String pattern) Converts a string to a java.util.Date using the specified pattern.
parseDouble(String s) Returns a double initialized to the value of the specified string.
parseDouble(String number, String pattern) Converts a string to a double using the specified format pattern.
parseFloat(String s) Returns a float initialized to the value of the specified string.
parseInt(String s) Returns an int initialized to the value of the specified string.
parseLong(String s) Returns a long initialized to the value of the specified string.
parseLong(String number, String pattern) Converts a string to a long using the specified format pattern.
parseShort(String s) Returns a short initialized to the value of the specified string.
print(Object value) Writes a value to the console.
println() Writes a new line to the console.
println(Object value) Writes a value followed by a new line to the console.
random() Returns a pseudorandomly chosen value between 0.0,and 1.0
repeat(String string, int count) Creates a new string out of the string provided, appended count times.
replaceAllRegex(String orignalString, CharSequence regex, CharSequence replacement) Returns a new string where all substring occurrences that matches the given regular expression has been replaced by the given replacement.
replaceChar(String original, char oldChar, char newChar) Returns a new string where all the occurrences of the oldChar has been replaced by the newChar
replaceFirstRegex(String orignalString, CharSequence regex, CharSequence replacement) Returns a new string where the first occurrence of the substring that matches the given regular expression has been replaced by the given replacement.
replaceString(String orignalString, CharSequence oldString, CharSequence newString) Returns a new string where all the occurrences of the oldChar has been replaced by the newChar
replaceSubstring(int start, int end, String original, String replacement) Returns a copy of the string with the characters replaced by the given replacement from the specified start and end indexes
reverse(String a) Returns the reverse sequence of the input String.
right(String string, int length) Returns the substring of string starting from the right until the specified length.
rint(double a) Returns a value that is equal to a mathematical integer closest in value to the parameter.
round(double a) Returns a long value closest to the parameter
round(Number number, int decimalPlaces) Returns a Number scaled according to the specified decimal places using RoundingMode.HALF_UP.
second(Date date) Returns a number representing the second within the minute of the input date or null if the specified date is null.
secondsToDate(Number number) Returns a Date by converting the given number as seconds.
secondsToDateTime(Number number) Returns a Date that has the given Number input set as the time in seconds
sha256(Object ... values) Applies the SHA-256 message digest algorithm to values and returns it as a string.
sha512(Object ... values) Applies the SHA-512 message digest algorithm to values and returns it as a string.
signum(int a) Returns the signum function value of the parameter.
signum(long a) Returns the signum function value of the parameter.
signum(double a) Returns the signum function value of the parameter.
signum(BigInteger a) Returns the signum function value of the parameter.
signum(BigDecimal a) Returns the signum function value of the parameter.
sin(double a) Returns the sine of a double.
sinh(double a) Returns the hyberbolic sine value of the parameter.
split(String string, String regex, int limit) Returns an array of String split around the given regular expression.
split(String string, String regex) Returns an array of String split around the given regular expression.
sqrt(double a) Returns the square root of a double value.
startsWith(String string, String substring, boolean caseSensitive) Returns true if the string starts with substring. If caseSensitive is true, it will match the exact case.
startsWith(CharSequence string, CharSequence substring) Returns true if the string starts with substring.
startsWith(CharSequence string, CharSequence substring, int offset) Returns true if the string starts with substring. If offset is set, it will start matching the substring at that point in the string.
substring(String string, int beginIndex, int endIndex) Returns the substring of string starting from the beginIndex until one before the endIndex. An empty is returned if either index is greater than the length of the string.
swapCase(String value) Toggles the case of a string by changing upper to lower case and lower case to upper case.
tan(double a) Returns the tangent of a double.
tanh(double a) Returns the hyberbolic tangent value of the parameter.
toBigDecimal(Object value) Converts value to a BigDecimal. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
toBigInteger(Object value) Converts value to a BigInteger. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
toBoolean(Object value) Converts value to a Boolean.
toByte(Object value) Converts value to a byte. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
toDate(Date value) Converts value to a java.sql.Date.
toDatetime(Date value) Converts value to a java.util.Date.
toDegrees(double a) Returns the approximate degrees equivalent value of an angle measured in radians.
toDouble(Object value) Converts value to a Double. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
toFloat(Object value) Converts value to a float. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
toInt(Object value) Converts value to an Integer. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
toLong(Object value) Converts value to a Long. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
toLowerCase(Object value) Converts all the characters in value to lowercase.
toLowerCaseFirstChar(String value) Returns a copy string with the first letter in lower case.
toRadians(double a) Returns the approximate radians equivalent value of an angle measured in degrees.
toShort(Object value) Converts value to a short. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
toTime(Date value) Converts value to a java.sql.Time.
toUpperCase(Object value) Converts all the characters in value to uppercase.
toUpperCaseFirstChar(String value) Returns a copy of the string with the first letter in upper case.
trim(String value) Returns a copy of the string where the leading and trailing whitepsaces removed.
trimFrom(String string, String substring) Removes the first instance of the substring and all characters after it.
trimLeft(String string) Removes all leading whitespace.
trimLeft(String string, char padChar) Removes all leading characters specified. If padChar is not specified, whitespace is removed.
trimRight(String string) Removes all trailing whitespace.
trimRight(String string, char padChar) Removes all trailing characters specified. If padChar is not specified, whitespace is removed.
trimTo(String string, String substring) Removes all characters up to and including the first instance of the substring.
uncapitalize(String value) Removes capitalization from a string by changing the first letter to lower case. No other letters are changed.
weekOfYear(Date date) Returns a number representing the week of the year (0–53) of the input date or null if the specified date is null.
year(Date date) Returns the date's year or null if the specified date is null.



Built-in Functions

Returns the absolute value of a number.
Parameters:
a - the int value whose absolute value is to be determined
Returns:
int
Returns the absolute value of a number.
Parameters:
a - the long value whose absolute value is to be determined
Returns:
long
Returns the absolute value of a number.
Parameters:
a - the double value whose absolute value is to be determined
Returns:
double
Returns the absolute value of a number.
Parameters:
a - the BigInteger value whose absolute value is to be determined
Returns:
java.math.BigInteger
Returns the absolute value of a number.
Parameters:
a - the BigDecimal value whose absolute value is to be determined
Returns:
java.math.BigDecimal
Returns the arc cosine of a double.
Returns:
double
Convert an array of Objects to a String separated by the separator.
Parameters:
array - Object array
separator - the separator for the Objects
Returns:
java.lang.String
Convert an int array to a String separated by the separator.
Parameters:
array - int array
separator - the separator for the ints
Returns:
java.lang.String
Convert a long array to a String separated by the separator.
Parameters:
array - long array
separator - the separator for the longs
Returns:
java.lang.String
Convert a double array to a String separated by the separator.
Parameters:
array - double array
separator - the separator for the doubles
Returns:
java.lang.String
Convert a List<?> to a String separated by the separator.
Parameters:
array - a List<?>
separator - the separator for the List<?>
Returns:
java.lang.String
Returns the arc sine of a double.
Returns:
double
Returns the arc tangent of a double.
Returns:
double
Converts an array of bytes to a hexadecimal string.
Parameters:
bytes - the array of bytes to convert
Returns:
java.lang.String
Capitalizes a string by changing the first letter to upper case. No other letters are changed.
Parameters:
value - the String to be processed
Returns:
java.lang.String
Returns the cube root of a double value.
Returns:
double
Returns the smallest value that is greater or equal to the parameter value.
Returns:
double
Returns the first non-null expression or null if all expressions are null.
Parameters:
expression - an array of Objects
Returns:
java.lang.Object
Converts a string column name to an int. (e.g., column A = 0, column CW = 100, column AB = 27)
Parameters:
columnName - the string to convert
Returns:
int
Compares two Objects. Returns 0 if both objects are equal, -1 if the first object is null, 1 if the second object in null.
Parameters:
o1 - the first Object
o2 - the second Object
Returns:
int
Compares two string if they are equal. If caseSensitive is true, it matches the exact case. A value of 0 is returned if the strings are equal, -1 if the first string is null, 1 if the second string is null.
Parameters:
s1 - the first string to compare to
s2 - the second string to compare to
caseSensitive - set to false to ignore case
Returns:
int
Returns true if the string contains the substring. It will match the exact case.
Parameters:
string - the string to be searched
substring - the string to search for
Returns:
boolean
Returns true if the string contains the substring. If caseSensitive is true, it will match the exact case.
Parameters:
string - the string to be searched
substring - the string to search for
caseSensitive - set to true to match exact case
Returns:
boolean
Returns true if the string element is contained in the array of string elements. If caseSensitive is true, it will match the exact case.
Parameters:
elements - array of strings to be searched
element - the string to search for
caseSensitive - set to true to match exact case
Returns:
boolean
Returns the cosine of a double.
Returns:
double
Returns the hyberbolic cosine value of the parameter.
Returns:
double
Counts the number of digits in a string.
Returns:
int
Counts the number of letters in a string.
Returns:
int
Counts the number of lowercase letters in a String.
Returns:
int
Counts the number of symbols in a string.
Returns:
int
Counts the number of uppercase letters in a String.
Returns:
int
Returns the current time in milliseconds since midnight, January 1, 1970 UTC.
Returns:
long
Returns a number representing the day of the month (1–31) of the input date or null if the specified date is null.
Returns:
java.lang.Integer
Returns a number representing the day of the week (0–6, Sunday is 0) of the input date or null if the specified date is null.
Returns:
java.lang.Integer
Returns a number representing the day of the year (1–366) of the input date or null if the specified date is null.
Returns:
java.lang.Integer
Returns a Date by converting the given number as days.
Returns:
java.util.Date
Returns a Date that has the given Number input set as the time in days
Returns:
java.util.Date
Returns result1 if expression equals search1. Otherwise expression is matched against searchResultDefault and the result is the next Object in the array (i.e., the array are search pairs of search and result objects).
Parameters:
expression - the Object to search for
search1 - the first Object to be matched with expression
result1 - returned when expression equals search1
searchResultDefault - an array of search pairs (search and result)
Returns:
java.lang.Object
Returns a copy of the string with the characters deleted from the specified start and end indexes
Returns:
java.lang.String
Returns null if the string is empty. Otherwise, the same string is returned.
Parameters:
s - a string
Returns:
java.lang.String
Returns true if the string ends with the substring. If caseSensitive is true, it will match the exact case.
Parameters:
string - the string to be searched
substring - the string to search for
caseSensitive - set to true to match exact case
Returns:
boolean
Returns true if the string ends with the substring.
Parameters:
string - the CharSequence to be searched
substring - the CharSequence to search for
Returns:
boolean
Returns true if both Objects are equal.
Parameters:
expression1 - the first Object to compare
expression2 - the second Object to compare
Returns:
boolean
Returns the largest value that is lesser or equal to the parameter value.
Returns:
double
Converts a java.util.Date to a string using the specified format pattern.
Parameters:
date - the date to be formatted as a string.
pattern - the pattern describing the date and time format.
Returns:
java.lang.String
Converts a Double to a string using the specified format pattern.
Parameters:
number - the value to format
pattern - the pattern describing the number format.
Returns:
java.lang.String
Converts a Long to a string using the specified format pattern.
Parameters:
number - the value to format
pattern - the pattern describing the number format.
Returns:
java.lang.String
Converts a Number to a string using the specified format pattern.
Parameters:
number - the value to format
pattern - the pattern describing the number format.
Returns:
java.lang.String
Returns the number of searchChars contained in string or zero (0).
Parameters:
string - the string to be searched
searchChar - the character to search for
Returns:
int
Returns the field value in the specified records by index.
Returns:
java.lang.Object
Returns the field value in the specified records by name.
Returns:
java.lang.Object
Returns a random string with the specified length.
Parameters:
length - the resulting length of the string
Returns:
java.lang.String
Returns a number representing the hour of the day of the input date or null if the specified date is null.
Returns:
java.lang.Integer
Returns a Date by converting the given number as hours.
Returns:
java.util.Date
Returns a Date that has the given Number input set as the time in hours
Returns:
java.util.Date
Returns the sqrt(a2 + b2) value of the parameters.
Returns:
double
Returns trueResult if booleanExpression is true, otherwise returns falseResult.
Parameters:
booleanExpression - the boolean expression
trueResult - the Object to return if the boolean expression is true
falseResult - the Object to return if the boolean expression is false
Returns:
java.lang.Object
Returns the position of the substring within the string or -1. If caseSensitive is true, it will match the exact case.
Parameters:
string - the string to be searched
substring - the string to search for
caseSensitive - set to true to match exact case
Returns:
int
Returns a copy of the original string with the second string parameter inserted at the specified index.
Returns:
java.lang.String
Converts an int to a string column name. Similar to spreadsheet column names. (e.g., column 27 = AB, column 100 = CW, column 0 = A)
Parameters:
column - the number to convert
Returns:
java.lang.String
Returns a Date by converting the given number as days.
Returns:
java.lang.Long
Returns a Date by converting the given number as days.
Returns:
java.lang.Integer
Returns a Date by converting the given number as days.
Returns:
java.lang.Long
Returns a Date by converting the given number as days.
Returns:
java.lang.Integer
Return true if the string is empty, null or all whitespaces.
Parameters:
s - the string to be processed
Returns:
boolean
Return true if the string is not empty or is not null.
Parameters:
s - the string to be processed
Returns:
boolean
Returns true if actual equals one of the integers in expected.
Parameters:
actual - the int to compare
expected - the array of int to be compared with
Returns:
boolean
Returns true if actual equals one of the objects in expected.
Parameters:
actual - the Object to compare
expected - the array of Objects to be compared with
Returns:
java.lang.Object
Returns a String composed of the elements joined by the separator.
Returns:
java.lang.String
Returns the substring of string starting from the left until the specified length.
Parameters:
string - the string to be parsed
length - the number of characters to return
Returns:
java.lang.String
Returns the length of value.
Parameters:
value - the Object to be processed
Returns:
int
Returns the natural logarithm of a double value.
Returns:
double
Returns the base 10 logarithm of a double value.
Returns:
double
Returns the first record found (or null) after performing a lookup using the specified source and keys.
Returns:
com.northconcepts.datapipeline.core.Record
Performs a lookup using the specified source and keys and returns the field value by index in the first record found (or null).
Returns:
java.lang.Object
Performs a lookup using the specified source and keys and returns the field value by name in the first record found (or null).
Returns:
java.lang.Object
Returns true if both strings match. If caseSensitive is true, it will match the exact case. If allowEmpty is true, it will allow matching with an empty string.
Parameters:
s1 - the first string to match
s2 - the second string to match
caseSensitive - set to true to match exact case
allowEmpty - set to true to allow empty string matching
Returns:
boolean
Returns true if both strings match. If caseSensitive is true, it will match the exact case.
Parameters:
s1 - the first string to match
s2 - the second string to match
caseSensitive - set to true to match exact case
Returns:
boolean
Returns true if both strings match.
Parameters:
s1 - the first string to match
s2 - the second string to match
Returns:
boolean
Returns true if the provided string matches the given regular expression.
Returns:
boolean
Returns true if the provided string matches the regular expression using the given flags.
Parameters:
string - - The string to be checked with the regular expression
regex - - The Regular Expression to be used
ignoreCase - - Disables case-sensitive matching when set to true
dotAll - - When set to true the expression . will match any character including line separators
multiLine - - When set to true, this method will return true if any of the lines match the provided regular expression
Returns:
boolean
Returns the largest number of a set of numbers.
Returns:
int
Returns the largest number of a set of numbers.
Returns:
long
Returns the largest number of a set of numbers.
Returns:
double
Returns the largest number of a set of numbers.
Returns:
java.math.BigDecimal
Returns the largest number of a set of numbers.
Returns:
java.math.BigInteger
Applies the MD5 message digest algorithm to values and returns it as a string.
Parameters:
values - the Object array to be hashed
Returns:
java.lang.String
Returns a number representing the millisecond within the second of the input date or null if the specified date is null.
Returns:
java.lang.Integer
Returns a Date by converting the given number as milliseconds.
Returns:
java.util.Date
Returns a Date that has the given Number input set as the time in milliseconds
Returns:
java.util.Date
Returns the smallest number of a set of numbers.
Returns:
int
Returns the smallest number of a set of numbers.
Returns:
long
Returns the smallest number from a set of numbers.
Returns:
double
Returns the smallest number from a set of numbers.
Returns:
java.math.BigDecimal
Returns the smallest number from a set of numbers.
Returns:
java.math.BigInteger
Returns a number representing the minute within the hour of the input date or null if the specified date is null.
Returns:
java.lang.Integer
Returns a Date by converting the given number as minutes.
Returns:
java.util.Date
Returns a Date that has the given Number input set as the time in minutes
Returns:
java.util.Date
Returns the date's month (1-12) or null if the specified date is null.
Returns:
java.lang.Integer
Returns the current value of the high-resolution time source in nanoseconds.
Returns:
long
Returns the current date-time.
Returns:
java.util.Date
Returns null if the two expressions are equal, otherwise returns expression1.
Parameters:
expression1 - the first Object to compare
expression2 - the second Object to compare
Returns:
java.lang.Object
Pads the number of characters specified on the left of the string, length is the resulting size of the string with padding.
Parameters:
string - the string to be padded
length - the resulting size of the string with padding
padChar - the character to add/pad
Returns:
java.lang.String
Pads the number of characters specified on the right of the string, length is the resulting size of the string with padding.
Parameters:
string - the string to be padded
length - the resulting size of the string with padding
padChar - the character to add/pad
Returns:
java.lang.String
Returns a BigDecimal initialized to the value of the specified string.
Parameters:
s - the string to be parsed
Returns:
java.math.BigDecimal
Returns a BigInteger initialized to the value of the specified string.
Parameters:
s - the string to be parsed
Returns:
java.math.BigInteger
Returns a boolean initialized to the value of the specified string.
Parameters:
s - the string to be parsed
Returns:
boolean
Returns a byte initialized to the value of the specified string.
Parameters:
s - the string to be parsed
Returns:
java.lang.Byte
Converts a string to a java.util.Date using the specified pattern.
Parameters:
value - the string to parse.
pattern - the pattern describing the date and time format.
Returns:
java.util.Date
Returns a double initialized to the value of the specified string.
Parameters:
s - the string to be parsed
Returns:
double
Converts a string to a double using the specified format pattern.
Parameters:
number - the value to parse.
pattern - the pattern describing the number format.
Returns:
double
Returns a float initialized to the value of the specified string.
Parameters:
s - the string to be parsed
Returns:
java.lang.Float
Returns an int initialized to the value of the specified string.
Parameters:
s - the string to be parsed
Returns:
int
Returns a long initialized to the value of the specified string.
Parameters:
s - the string to be parsed
Returns:
long
Converts a string to a long using the specified format pattern.
Parameters:
number - the value to parse.
pattern - the pattern describing the number format.
Returns:
long
Returns a short initialized to the value of the specified string.
Parameters:
s - the string to be parsed
Returns:
java.lang.Short
Writes a value to the console.
Returns:
void
Writes a new line to the console.
Returns:
void
Writes a value followed by a new line to the console.
Returns:
void
Returns a pseudorandomly chosen value between 0.0,and 1.0
Returns:
double
Creates a new string out of the string provided, appended count times.
Parameters:
string - the string to append
count - the number of times to append the string
Returns:
java.lang.String
Returns a new string where all substring occurrences that matches the given regular expression has been replaced by the given replacement.
Returns:
java.lang.String
Returns a new string where all the occurrences of the oldChar has been replaced by the newChar
Returns:
java.lang.String
Returns a new string where the first occurrence of the substring that matches the given regular expression has been replaced by the given replacement.
Returns:
java.lang.String
Returns a new string where all the occurrences of the oldChar has been replaced by the newChar
Returns:
java.lang.String
Returns a copy of the string with the characters replaced by the given replacement from the specified start and end indexes
Returns:
java.lang.String
Returns the reverse sequence of the input String.
Returns:
java.lang.String
Returns the substring of string starting from the right until the specified length.
Parameters:
string - the string to be parsed
length - the number of characters to return
Returns:
java.lang.String
Returns a value that is equal to a mathematical integer closest in value to the parameter.
Returns:
double
Returns a long value closest to the parameter
Returns:
long
Returns a Number scaled according to the specified decimal places using RoundingMode.HALF_UP.
Returns:
java.lang.Number
Returns a number representing the second within the minute of the input date or null if the specified date is null.
Returns:
java.lang.Integer
Returns a Date by converting the given number as seconds.
Returns:
java.util.Date
Returns a Date that has the given Number input set as the time in seconds
Returns:
java.util.Date
Applies the SHA-256 message digest algorithm to values and returns it as a string.
Parameters:
values - the Object array to be hashed
Returns:
java.lang.String
Applies the SHA-512 message digest algorithm to values and returns it as a string.
Parameters:
values - the Object array to be hashed
Returns:
java.lang.String
Returns the signum function value of the parameter.
Returns:
int
Returns the signum function value of the parameter.
Returns:
long
Returns the signum function value of the parameter.
Returns:
double
Returns the signum function value of the parameter.
Returns:
java.lang.Integer
Returns the signum function value of the parameter.
Returns:
java.lang.Integer
Returns the sine of a double.
Returns:
double
Returns the hyberbolic sine value of the parameter.
Returns:
double
Returns an array of String split around the given regular expression.
Returns:
java.lang.String[]
Returns an array of String split around the given regular expression.
Returns:
java.lang.String[]
Returns the square root of a double value.
Returns:
double
Returns true if the string starts with substring. If caseSensitive is true, it will match the exact case.
Parameters:
string - the string to be searched
substring - the substring to search for
caseSensitive - set to true to match exact case
Returns:
boolean
Returns true if the string starts with substring.
Parameters:
string - the CharSequence to be searched
substring - the CharSequence to search for
Returns:
boolean
Returns true if the string starts with substring. If offset is set, it will start matching the substring at that point in the string.
Parameters:
string - the CharSequence to be searched
substring - the CharSequence to search for
offset - the starting point of the search
Returns:
boolean
Returns the substring of string starting from the beginIndex until one before the endIndex. An empty is returned if either index is greater than the length of the string.
Parameters:
string - the string to be parsed
beginIndex - the starting index
endIndex - one after the ending index
Returns:
java.lang.String
Toggles the case of a string by changing upper to lower case and lower case to upper case.
Parameters:
value - the String to be processed
Returns:
java.lang.String
Returns the tangent of a double.
Returns:
double
Returns the hyberbolic tangent value of the parameter.
Returns:
double
Converts value to a BigDecimal. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
Parameters:
value - the Object to convert
Returns:
java.math.BigDecimal
Converts value to a BigInteger. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
Parameters:
value - the Object to convert
Returns:
java.math.BigInteger
Converts value to a Boolean.
Parameters:
value - the Object to convert
Returns:
java.lang.Boolean
Converts value to a byte. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
Parameters:
value - the Object to convert
Returns:
java.lang.Byte
Converts value to a java.sql.Date.
Parameters:
value - the Object to convert
Returns:
java.sql.Date
Converts value to a java.util.Date.
Parameters:
value - the Object to convert
Returns:
java.util.Date
Returns the approximate degrees equivalent value of an angle measured in radians.
Returns:
double
Converts value to a Double. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
Parameters:
value - the Object to convert
Returns:
java.lang.Double
Converts value to a float. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
Parameters:
value - the Object to convert
Returns:
java.lang.Float
Converts value to an Integer. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
Parameters:
value - the Object to convert
Returns:
java.lang.Integer
Converts value to a Long. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
Parameters:
value - the Object to convert
Returns:
java.lang.Long
Converts all the characters in value to lowercase.
Parameters:
value - the Object to be processed
Returns:
java.lang.String
Returns a copy string with the first letter in lower case.
Returns:
java.lang.String
Returns the approximate radians equivalent value of an angle measured in degrees.
Returns:
double
Converts value to a short. This method accepts numbers, objects, and nulls (not just strings). It also trims strings if parsing is needed.
Parameters:
value - the Object to convert
Returns:
java.lang.Short
Converts value to a java.sql.Time.
Parameters:
value - the Object to convert
Returns:
java.sql.Time
Converts all the characters in value to uppercase.
Parameters:
value - the Object to be processed
Returns:
java.lang.String
Returns a copy of the string with the first letter in upper case.
Returns:
java.lang.String
Returns a copy of the string where the leading and trailing whitepsaces removed.
Returns:
java.lang.String
Removes the first instance of the substring and all characters after it.
Returns:
java.lang.String
Removes all leading whitespace.
Parameters:
string - the string to be trimmed
Returns:
java.lang.String
Removes all leading characters specified. If padChar is not specified, whitespace is removed.
Parameters:
string - the string to be trimmed
padChar - the character to trim
Returns:
java.lang.String
Removes all trailing whitespace.
Parameters:
string - the string to be trimmed
Returns:
java.lang.String
Removes all trailing characters specified. If padChar is not specified, whitespace is removed.
Parameters:
string - the string to be trimmed
padChar - the character to trim
Returns:
java.lang.String
Removes all characters up to and including the first instance of the substring.
Returns:
java.lang.String
Removes capitalization from a string by changing the first letter to lower case. No other letters are changed.
Parameters:
value - the String to be processed
Returns:
java.lang.String
Returns a number representing the week of the year (0–53) of the input date or null if the specified date is null.
Returns:
java.lang.Integer
Returns the date's year or null if the specified date is null.
Returns:
java.lang.Integer
Mobile Analytics