Package com.reportmill.base
Class RMKeyChainFuncs
java.lang.Object
com.reportmill.base.RMKeyChainFuncs
This class holds all of RM's built-in key chain functions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Object
Returns the absolute value of the given value.static Number
average
(List aList, RMKeyChain aKeyChain) Returns the average resulting by evaluating the keychain on given list objects.static Number
averageX
(List aList, RMKeyChain aKeyChain) Returns the average resulting by evaluating the keychain on given list objects.static Object
Returns the given value as a double rounded up to the nest largest integer.static Number
count
(List aList, RMKeyChain aKeyChain) Returns the count of the given list or if keychain is present, all true values.static Number
countDeep
(List aList, RMKeyChain aKeyChain) Returns the count of all leaf nodes in given list.static Number
countUnique
(List aList, RMKeyChain aKeyChain) Returns the count of the unique values for a given list and key chain.static boolean
Returns true if given object string ends with given string.static List
filter
(List aList, RMKeyChain aKeyChain) Returns the original list with items that fail the given boolean key chain removed.static Object
Returns the given value as a double truncated down to the nest smallest integer.static Object
get
(List aList, RMKeyChain aKeyChain) Returns the specific object that meets the criteria.static Object[]
getArgsForKeyChain
(Object obj, RMKeyChain node) Returns an array of evaluated args for an RMKeyChain ARG_LIST, used when evaluating functions.static List
group
(List aList, RMKeyChain aKeyChain) Returns the original list grouped by the given key chain.static Object
Returns an xstring by interpreting html commands in the given string.static String
Returns the result of joining results of evaluating keychain on given list objects, separated by delimiter.static String
join
(List aList, RMKeyChain aKeyChain) Aggregator version of join.static Object
Returns the maximum value of the two given values.static Object
max
(List aList, RMKeyChain aKeyChain) Returns the maximum result of evaluating the keychain on given list objects.static Object
Returns the minimum value of the two given values.static Object
min
(List aList, RMKeyChain aKeyChain) Returns the minimum result of evaluating the keychain on given list objects.static Object
Returns the first value raised to the power of the second value.static Object
RMAllFontGlyphs
(Object fontName) Returns all of the printable characters for the given font name.static Object
RMConditional
(Object condition, Object trueVal) Returns the trueVal if condition is true, otherwise null.static Object
RMConditional
(Object condition, Object trueVal, Object falseVal) Returns either the trueVal or falseValue depending on whether condition is true.static Object
Returns the string resulting by applying a default format to the given value.static Object
Returns the unicode character string for the given unicode value.static Object
RMUnicodeRange
(Object c1, Object c2) Returns the unicode string for the given range of unicode values.static Object
Returns the given value as a double rounded to the nearest integer.static Object
Returns an xstring by interpreting rtf commands in the given string.static boolean
shouldRecurse
(List aList, RMKeyChain aKeyChain) Returns whether given list should be recursed into for aggregate calculations.static boolean
startsWith
(Object anObj, Object aString) Returns true if given object string starts with given string.static String
Returns the substring of the given string from the given index onward.static String
Returns the substring of the given string in the given start/end range.static Number
total
(List aList, RMKeyChain aKeyChain) Returns the total resulting from evaluating given keychain on given list of objects (nulls are zero).static Number
total2
(List aList, RMKeyChain aKeyChain) Returns the total resulting from evaluating given keychain on given list of objects (nulls are zero).static Number
totalX
(List aList, RMKeyChain aKeyChain) Returns the total resulting from evaluating given keychain on given list of objects (nulls short circuit).
-
Constructor Details
-
RMKeyChainFuncs
public RMKeyChainFuncs()
-
-
Method Details
-
getArgsForKeyChain
Returns an array of evaluated args for an RMKeyChain ARG_LIST, used when evaluating functions. -
ceil
Returns the given value as a double rounded up to the nest largest integer. -
floor
Returns the given value as a double truncated down to the nest smallest integer. -
round
Returns the given value as a double rounded to the nearest integer. -
abs
Returns the absolute value of the given value. -
max
Returns the maximum value of the two given values. -
min
Returns the minimum value of the two given values. -
pow
Returns the first value raised to the power of the second value. -
html
Returns an xstring by interpreting html commands in the given string. -
rtf
Returns an xstring by interpreting rtf commands in the given string. -
RMConditional
Returns the trueVal if condition is true, otherwise null. -
RMConditional
Returns either the trueVal or falseValue depending on whether condition is true. -
startsWith
Returns true if given object string starts with given string. -
endsWith
Returns true if given object string ends with given string. -
substring
Returns the substring of the given string from the given index onward. -
substring
Returns the substring of the given string in the given start/end range. -
join
Returns the result of joining results of evaluating keychain on given list objects, separated by delimiter. -
RMFormat
Returns the string resulting by applying a default format to the given value. -
RMUnicode
Returns the unicode character string for the given unicode value. -
RMUnicodeRange
Returns the unicode string for the given range of unicode values. -
RMAllFontGlyphs
Returns all of the printable characters for the given font name. -
total
Returns the total resulting from evaluating given keychain on given list of objects (nulls are zero). -
total2
Returns the total resulting from evaluating given keychain on given list of objects (nulls are zero). -
totalX
Returns the total resulting from evaluating given keychain on given list of objects (nulls short circuit). -
count
Returns the count of the given list or if keychain is present, all true values. -
countDeep
Returns the count of all leaf nodes in given list. -
countUnique
Returns the count of the unique values for a given list and key chain. -
average
Returns the average resulting by evaluating the keychain on given list objects. -
averageX
Returns the average resulting by evaluating the keychain on given list objects. -
min
Returns the minimum result of evaluating the keychain on given list objects. -
max
Returns the maximum result of evaluating the keychain on given list objects. -
get
Returns the specific object that meets the criteria. -
filter
Returns the original list with items that fail the given boolean key chain removed. -
group
Returns the original list grouped by the given key chain. -
join
Aggregator version of join. aKeyChain is an arglist with 2 args, as in join(getName, "\n") The first arg is the keychain to be evaluated for each object in the list, and the second arg is the separator string. -
shouldRecurse
Returns whether given list should be recursed into for aggregate calculations.
-