Class RMKeyChainFuncs

java.lang.Object
com.reportmill.base.RMKeyChainFuncs

public class RMKeyChainFuncs extends Object
This class holds all of RM's built-in key chain functions.
  • Constructor Details

    • RMKeyChainFuncs

      public RMKeyChainFuncs()
  • Method Details

    • getArgsForKeyChain

      public static Object[] getArgsForKeyChain(Object obj, RMKeyChain node)
      Returns an array of evaluated args for an RMKeyChain ARG_LIST, used when evaluating functions.
    • ceil

      public static Object ceil(Object val)
      Returns the given value as a double rounded up to the nest largest integer.
    • floor

      public static Object floor(Object val)
      Returns the given value as a double truncated down to the nest smallest integer.
    • round

      public static Object round(Object val)
      Returns the given value as a double rounded to the nearest integer.
    • abs

      public static Object abs(Object val)
      Returns the absolute value of the given value.
    • max

      public static Object max(Object arg1, Object arg2)
      Returns the maximum value of the two given values.
    • min

      public static Object min(Object arg1, Object arg2)
      Returns the minimum value of the two given values.
    • pow

      public static Object pow(Object arg1, Object arg2)
      Returns the first value raised to the power of the second value.
    • html

      public static Object html(Object val)
      Returns an xstring by interpreting html commands in the given string.
    • rtf

      public static Object rtf(Object val)
      Returns an xstring by interpreting rtf commands in the given string.
    • RMConditional

      public static Object RMConditional(Object condition, Object trueVal)
      Returns the trueVal if condition is true, otherwise null.
    • RMConditional

      public static Object RMConditional(Object condition, Object trueVal, Object falseVal)
      Returns either the trueVal or falseValue depending on whether condition is true.
    • startsWith

      public static boolean startsWith(Object anObj, Object aString)
      Returns true if given object string starts with given string.
    • endsWith

      public static boolean endsWith(Object anObj, Object aString)
      Returns true if given object string ends with given string.
    • substring

      public static String substring(Object aString, Object start)
      Returns the substring of the given string from the given index onward.
    • substring

      public static String substring(Object aString, Object start, Object end)
      Returns the substring of the given string in the given start/end range.
    • join

      public static String join(Object aList, Object aKeyChain, Object aDelimiter)
      Returns the result of joining results of evaluating keychain on given list objects, separated by delimiter.
    • RMFormat

      public static Object RMFormat(Object anObj)
      Returns the string resulting by applying a default format to the given value.
    • RMUnicode

      public static Object RMUnicode(Object num)
      Returns the unicode character string for the given unicode value.
    • RMUnicodeRange

      public static Object RMUnicodeRange(Object c1, Object c2)
      Returns the unicode string for the given range of unicode values.
    • RMAllFontGlyphs

      public static Object RMAllFontGlyphs(Object fontName)
      Returns all of the printable characters for the given font name.
    • total

      public static Number total(List aList, RMKeyChain aKeyChain)
      Returns the total resulting from evaluating given keychain on given list of objects (nulls are zero).
    • total2

      public static Number total2(List aList, RMKeyChain aKeyChain)
      Returns the total resulting from evaluating given keychain on given list of objects (nulls are zero).
    • totalX

      public static Number totalX(List aList, RMKeyChain aKeyChain)
      Returns the total resulting from evaluating given keychain on given list of objects (nulls short circuit).
    • count

      public static Number count(List aList, RMKeyChain aKeyChain)
      Returns the count of the given list or if keychain is present, all true values.
    • countDeep

      public static Number countDeep(List aList, RMKeyChain aKeyChain)
      Returns the count of all leaf nodes in given list.
    • countUnique

      public static Number countUnique(List aList, RMKeyChain aKeyChain)
      Returns the count of the unique values for a given list and key chain.
    • average

      public static Number average(List aList, RMKeyChain aKeyChain)
      Returns the average resulting by evaluating the keychain on given list objects.
    • averageX

      public static Number averageX(List aList, RMKeyChain aKeyChain)
      Returns the average resulting by evaluating the keychain on given list objects.
    • min

      public static Object min(List aList, RMKeyChain aKeyChain)
      Returns the minimum result of evaluating the keychain on given list objects.
    • max

      public static Object max(List aList, RMKeyChain aKeyChain)
      Returns the maximum result of evaluating the keychain on given list objects.
    • get

      public static Object get(List aList, RMKeyChain aKeyChain)
      Returns the specific object that meets the criteria.
    • filter

      public static List filter(List aList, RMKeyChain aKeyChain)
      Returns the original list with items that fail the given boolean key chain removed.
    • group

      public static List group(List aList, RMKeyChain aKeyChain)
      Returns the original list grouped by the given key chain.
    • join

      public static String join(List aList, RMKeyChain aKeyChain)
      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

      public static boolean shouldRecurse(List aList, RMKeyChain aKeyChain)
      Returns whether given list should be recursed into for aggregate calculations.