Package com.inductiveautomation.rm.base
Class RMKeyChainFuncs
- java.lang.Object
- 
- com.inductiveautomation.rm.base.RMKeyChainFuncs
 
- 
 public class RMKeyChainFuncs extends java.lang.ObjectThis class represents an RM function call (method plus args) and defines a bunch of built-in functions.
- 
- 
Constructor SummaryConstructors Constructor Description RMKeyChainFuncs(java.lang.reflect.Method aMethod, java.lang.Object[] theArgs)Creates a function call.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static doubleabs(java.lang.Object val)Returns the absolute value of the given value.static voidaddFunctionClass(java.lang.Class aClass)Adds a class to the list of classes that RM queries for functions.static longceil(java.lang.Object val)Returns the given value as a double rounded up to the nest largest integer.static booleanendsWith(java.lang.Object anObj, java.lang.Object aString)Returns true if given object string ends with given string.static booleanendsWith(java.lang.String aString, java.lang.Object post)Returns whether given string ends with other given string (category method).static java.lang.Stringfix(java.lang.String aString, java.lang.Object aLength)Fixes the given string to the given length, padding by space.static java.lang.Stringfix(java.lang.String aString, java.lang.Object aLength, java.lang.Object aPad)Fixes the given string to the given length with the given pad string.static longfloor(java.lang.Object val)Returns the given value as a double truncated down to the nest smallest integer.static java.lang.Stringformat(java.lang.Double aDouble, java.lang.Object aFormatString)Returns string format of given Double using given decimal format string (category method).static java.lang.Stringformat(java.lang.Float aFloat, java.lang.Object aFormatString)Returns string format of given Float using given decimal format string (category method).static java.lang.Stringformat(java.lang.Integer anInt, java.lang.Object aFormatString)Returns string format of given Integer using given decimal format string (category method).static java.lang.Stringformat(java.lang.Number aNumber, java.lang.Object aFormatString)Returns string format of given number using given decimal format string (category method).static java.lang.Stringformat(java.math.BigDecimal aDecimal, java.lang.Object aFormatString)Returns string format of given BigDecimal using given decimal format string (category method).static java.lang.Stringformat(java.util.Date aDate, java.lang.Object stringObj)Returns string format of given date, using given date format string (category method).static RMKeyChainFuncsgetFunctionCall(java.lang.Object aRoot, java.lang.Object anObj, RMKeyChain aKeyChain)Find the Method to invoke for evaluating the given key chain (assumed to be a function) on the given object.static java.lang.Objecthtml(java.lang.Object aValue)Returns an xstring by interpreting html commands in the given string.java.lang.Objectinvoke(java.lang.Object anObj)Invoke method.booleanisEmpty(java.lang.Object anObject)Returns whether given string is empty (or null).static java.lang.Stringjoin(java.lang.Object aList, java.lang.Object aKeyChain, java.lang.Object aDelimiter)Returns the result of joining results of evaluating keychain on given list objects, separated by delimiter.static java.util.Listlist(java.lang.Object... theObjects)Returns a list of the given args.static java.lang.Objectmax(java.lang.Object arg1, java.lang.Object arg2)Returns the maximum value of the two given values.static java.lang.Objectmin(java.lang.Object arg1, java.lang.Object arg2)Returns the minimum value of the two given values.static java.lang.Numbernumber(java.lang.String aString)Returns a number for a given string.static java.lang.Stringpad(java.lang.String aString, java.lang.Object aLength)Returns the given string padded by the given string to be the given length (category method).static java.lang.Stringpad(java.lang.String aString, java.lang.Object aPad, java.lang.Object aLength)Returns the given string padded by the given string to be the given length (category method).static java.lang.StringpadLeft(java.lang.String aString, java.lang.Object aPad, java.lang.Object aLength)Returns the given string padded by the given string to be the given length (category method).static java.lang.Doublepow(java.lang.Object arg1, java.lang.Object arg2)Returns the first value raised to the power of the second value.static java.lang.ObjectRMAllFontGlyphs(java.lang.Object fontName)Returns all of the printable characters for the given font name.static java.lang.ObjectRMAllFonts(java.lang.Object aSize)Returns a string with all fonts names rendered as the fonts themselves (at the given size).static java.lang.ObjectRMConditional(java.lang.Object v, java.lang.Object t)Returns the trueVal if condition is true, otherwise null.static java.lang.ObjectRMConditional(java.lang.Object v, java.lang.Object t, java.lang.Object f)static java.lang.ObjectRMHTML(java.lang.Object aValue)Returns an xstring by interpreting html commands in the given string.static RMXStringRMImage(java.lang.Object aSource)Returns an xstring with an embedded image shape for given image source.static java.lang.ObjectRMRTF(java.lang.Object aValue)Returns an xstring by interpreting rtf commands in the given string.static java.lang.ObjectRMUnicode(java.lang.Object num)Returns the unicode character string for the given unicode value.static java.lang.ObjectRMUnicodeRange(java.lang.Object c1, java.lang.Object c2)Returns the unicode string for the given range of unicode values.static java.lang.Stringroman(java.lang.Number aNumber)Formats the given object in roman numerals.static java.lang.Stringroman(java.lang.Object anObj)Formats the given object in roman numerals.static longround(java.lang.Object val)Returns the given value as a double rounded to the nearest integer.static java.lang.Objectrtf(java.lang.Object aValue)Returns an xstring by interpreting rtf commands in the given string.static java.lang.String[]split(java.lang.Object aString, java.lang.Object aRegex)Returns an array of strings by splitting given string with given regex separator.static booleanstartsWith(java.lang.Object anObj, java.lang.Object aString)Returns true if given object string starts with given string.static booleanstartsWith(java.lang.String aString, java.lang.Object pre)Returns whether given string starts with other given string (category method).static java.lang.Stringsubstring(java.lang.Object aString, java.lang.Object start)Returns the substring of the given string from the given index onward.static java.lang.Stringsubstring(java.lang.Object aString, java.lang.Object start, java.lang.Object end)Returns the substring of the given string in the given start/end range.static java.lang.Stringsubstring(java.lang.String aString, java.lang.Object start)Returns substring of given string from given start index (category method).static java.lang.Stringsubstring(java.lang.String aString, java.lang.Object start, java.lang.Object end)Returns substring of given string from given start index to given end index (category method).static java.lang.Stringwrap(java.lang.String aString, java.lang.Object aLength)Wraps the given string to a max of given length by adding newlines.
 
- 
- 
- 
Method Detail- 
getFunctionCallpublic static RMKeyChainFuncs getFunctionCall(java.lang.Object aRoot, java.lang.Object anObj, RMKeyChain aKeyChain) Find the Method to invoke for evaluating the given key chain (assumed to be a function) on the given object. fills args (if non-null) with the actual arguments to the function.
 - 
invokepublic java.lang.Object invoke(java.lang.Object anObj) throws java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessExceptionInvoke method.- Throws:
- java.lang.reflect.InvocationTargetException
- java.lang.IllegalAccessException
 
 - 
addFunctionClasspublic static void addFunctionClass(java.lang.Class aClass) Adds a class to the list of classes that RM queries for functions.
 - 
isEmptypublic boolean isEmpty(java.lang.Object anObject) Returns whether given string is empty (or null).
 - 
ceilpublic static long ceil(java.lang.Object val) Returns the given value as a double rounded up to the nest largest integer.
 - 
floorpublic static long floor(java.lang.Object val) Returns the given value as a double truncated down to the nest smallest integer.
 - 
roundpublic static long round(java.lang.Object val) Returns the given value as a double rounded to the nearest integer.
 - 
abspublic static double abs(java.lang.Object val) Returns the absolute value of the given value.
 - 
maxpublic static java.lang.Object max(java.lang.Object arg1, java.lang.Object arg2)Returns the maximum value of the two given values.
 - 
minpublic static java.lang.Object min(java.lang.Object arg1, java.lang.Object arg2)Returns the minimum value of the two given values.
 - 
powpublic static java.lang.Double pow(java.lang.Object arg1, java.lang.Object arg2)Returns the first value raised to the power of the second value.
 - 
htmlpublic static java.lang.Object html(java.lang.Object aValue) Returns an xstring by interpreting html commands in the given string.
 - 
rtfpublic static java.lang.Object rtf(java.lang.Object aValue) Returns an xstring by interpreting rtf commands in the given string.
 - 
RMHTMLpublic static java.lang.Object RMHTML(java.lang.Object aValue) Returns an xstring by interpreting html commands in the given string.
 - 
RMRTFpublic static java.lang.Object RMRTF(java.lang.Object aValue) Returns an xstring by interpreting rtf commands in the given string.
 - 
RMImagepublic static RMXString RMImage(java.lang.Object aSource) Returns an xstring with an embedded image shape for given image source.
 - 
RMConditionalpublic static java.lang.Object RMConditional(java.lang.Object v, java.lang.Object t)Returns the trueVal if condition is true, otherwise null.
 - 
RMConditionalpublic static java.lang.Object RMConditional(java.lang.Object v, java.lang.Object t, java.lang.Object f)
 - 
startsWithpublic static boolean startsWith(java.lang.Object anObj, java.lang.Object aString)Returns true if given object string starts with given string.
 - 
endsWithpublic static boolean endsWith(java.lang.Object anObj, java.lang.Object aString)Returns true if given object string ends with given string.
 - 
substringpublic static java.lang.String substring(java.lang.Object aString, java.lang.Object start)Returns the substring of the given string from the given index onward.
 - 
substringpublic static java.lang.String substring(java.lang.Object aString, java.lang.Object start, java.lang.Object end)Returns the substring of the given string in the given start/end range.
 - 
splitpublic static java.lang.String[] split(java.lang.Object aString, java.lang.Object aRegex)Returns an array of strings by splitting given string with given regex separator.
 - 
joinpublic static java.lang.String join(java.lang.Object aList, java.lang.Object aKeyChain, java.lang.Object aDelimiter)Returns the result of joining results of evaluating keychain on given list objects, separated by delimiter.
 - 
RMUnicodepublic static java.lang.Object RMUnicode(java.lang.Object num) Returns the unicode character string for the given unicode value.
 - 
RMUnicodeRangepublic static java.lang.Object RMUnicodeRange(java.lang.Object c1, java.lang.Object c2)Returns the unicode string for the given range of unicode values.
 - 
RMAllFontGlyphspublic static java.lang.Object RMAllFontGlyphs(java.lang.Object fontName) Returns all of the printable characters for the given font name.
 - 
RMAllFontspublic static java.lang.Object RMAllFonts(java.lang.Object aSize) Returns a string with all fonts names rendered as the fonts themselves (at the given size).
 - 
formatpublic static java.lang.String format(java.util.Date aDate, java.lang.Object stringObj)Returns string format of given date, using given date format string (category method).
 - 
formatpublic static java.lang.String format(java.lang.Number aNumber, java.lang.Object aFormatString)Returns string format of given number using given decimal format string (category method).
 - 
formatpublic static java.lang.String format(java.lang.Double aDouble, java.lang.Object aFormatString)Returns string format of given Double using given decimal format string (category method).
 - 
formatpublic static java.lang.String format(java.lang.Float aFloat, java.lang.Object aFormatString)Returns string format of given Float using given decimal format string (category method).
 - 
formatpublic static java.lang.String format(java.lang.Integer anInt, java.lang.Object aFormatString)Returns string format of given Integer using given decimal format string (category method).
 - 
formatpublic static java.lang.String format(java.math.BigDecimal aDecimal, java.lang.Object aFormatString)Returns string format of given BigDecimal using given decimal format string (category method).
 - 
substringpublic static java.lang.String substring(java.lang.String aString, java.lang.Object start)Returns substring of given string from given start index (category method).
 - 
substringpublic static java.lang.String substring(java.lang.String aString, java.lang.Object start, java.lang.Object end)Returns substring of given string from given start index to given end index (category method).
 - 
startsWithpublic static boolean startsWith(java.lang.String aString, java.lang.Object pre)Returns whether given string starts with other given string (category method).
 - 
endsWithpublic static boolean endsWith(java.lang.String aString, java.lang.Object post)Returns whether given string ends with other given string (category method).
 - 
numberpublic static java.lang.Number number(java.lang.String aString) Returns a number for a given string.
 - 
padpublic static java.lang.String pad(java.lang.String aString, java.lang.Object aLength)Returns the given string padded by the given string to be the given length (category method).
 - 
padpublic static java.lang.String pad(java.lang.String aString, java.lang.Object aPad, java.lang.Object aLength)Returns the given string padded by the given string to be the given length (category method).
 - 
padLeftpublic static java.lang.String padLeft(java.lang.String aString, java.lang.Object aPad, java.lang.Object aLength)Returns the given string padded by the given string to be the given length (category method).
 - 
fixpublic static java.lang.String fix(java.lang.String aString, java.lang.Object aLength)Fixes the given string to the given length, padding by space.
 - 
fixpublic static java.lang.String fix(java.lang.String aString, java.lang.Object aLength, java.lang.Object aPad)Fixes the given string to the given length with the given pad string.
 - 
wrappublic static java.lang.String wrap(java.lang.String aString, java.lang.Object aLength)Wraps the given string to a max of given length by adding newlines.
 - 
listpublic static java.util.List list(java.lang.Object... theObjects) Returns a list of the given args.
 - 
romanpublic static java.lang.String roman(java.lang.Object anObj) Formats the given object in roman numerals. If anObj is a date object, the year is formatted.
 - 
romanpublic static java.lang.String roman(java.lang.Number aNumber) Formats the given object in roman numerals. If anObj is a date object, the year is formatted.
 
- 
 
-