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 ObjectReturns the absolute value of the given value.static Numberaverage(List aList, RMKeyChain aKeyChain) Returns the average resulting by evaluating the keychain on given list objects.static NumberaverageX(List aList, RMKeyChain aKeyChain) Returns the average resulting by evaluating the keychain on given list objects.static ObjectReturns the given value as a double rounded up to the nest largest integer.static Numbercount(List aList, RMKeyChain aKeyChain) Returns the count of the given list or if keychain is present, all true values.static NumbercountDeep(List aList, RMKeyChain aKeyChain) Returns the count of all leaf nodes in given list.static NumbercountUnique(List aList, RMKeyChain aKeyChain) Returns the count of the unique values for a given list and key chain.static booleanReturns true if given object string ends with given string.static Listfilter(List aList, RMKeyChain aKeyChain) Returns the original list with items that fail the given boolean key chain removed.static ObjectReturns the given value as a double truncated down to the nest smallest integer.static Objectget(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 Listgroup(List aList, RMKeyChain aKeyChain) Returns the original list grouped by the given key chain.static ObjectReturns an xstring by interpreting html commands in the given string.static StringReturns the result of joining results of evaluating keychain on given list objects, separated by delimiter.static Stringjoin(List aList, RMKeyChain aKeyChain) Aggregator version of join.static ObjectReturns the maximum value of the two given values.static Objectmax(List aList, RMKeyChain aKeyChain) Returns the maximum result of evaluating the keychain on given list objects.static ObjectReturns the minimum value of the two given values.static Objectmin(List aList, RMKeyChain aKeyChain) Returns the minimum result of evaluating the keychain on given list objects.static ObjectReturns the first value raised to the power of the second value.static ObjectRMAllFontGlyphs(Object fontName) Returns all of the printable characters for the given font name.static ObjectRMConditional(Object condition, Object trueVal) Returns the trueVal if condition is true, otherwise null.static ObjectRMConditional(Object condition, Object trueVal, Object falseVal) Returns either the trueVal or falseValue depending on whether condition is true.static ObjectReturns the string resulting by applying a default format to the given value.static ObjectReturns the unicode character string for the given unicode value.static ObjectRMUnicodeRange(Object c1, Object c2) Returns the unicode string for the given range of unicode values.static ObjectReturns the given value as a double rounded to the nearest integer.static ObjectReturns an xstring by interpreting rtf commands in the given string.static booleanshouldRecurse(List aList, RMKeyChain aKeyChain) Returns whether given list should be recursed into for aggregate calculations.static booleanstartsWith(Object anObj, Object aString) Returns true if given object string starts with given string.static StringReturns the substring of the given string from the given index onward.static StringReturns the substring of the given string in the given start/end range.static Numbertotal(List aList, RMKeyChain aKeyChain) Returns the total resulting from evaluating given keychain on given list of objects (nulls are zero).static Numbertotal2(List aList, RMKeyChain aKeyChain) Returns the total resulting from evaluating given keychain on given list of objects (nulls are zero).static NumbertotalX(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.
-