Package com.inductiveautomation.rm.base
Class RMKeyChainFuncs
java.lang.Object
com.inductiveautomation.rm.base.RMKeyChainFuncs
This class represents an RM function call (method plus args) and defines a bunch of built-in functions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleReturns the absolute value of the given value.static voidaddFunctionClass(Class aClass) Adds a class to the list of classes that RM queries for functions.static longReturns the given value as a double rounded up to the nest largest integer.static booleanReturns true if given object string ends with given string.static booleanReturns whether given string ends with other given string (category method).static StringFixes the given string to the given length, padding by space.static StringFixes the given string to the given length with the given pad string.static longReturns the given value as a double truncated down to the nest smallest integer.static StringReturns string format of given Double using given decimal format string (category method).static StringReturns string format of given Float using given decimal format string (category method).static StringReturns string format of given Integer using given decimal format string (category method).static StringReturns string format of given number using given decimal format string (category method).static Stringformat(BigDecimal aDecimal, Object aFormatString) Returns string format of given BigDecimal using given decimal format string (category method).static StringReturns string format of given date, using given date format string (category method).static RMKeyChainFuncsgetFunctionCall(Object aRoot, 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 ObjectReturns an xstring by interpreting html commands in the given string.Invoke method.booleanReturns whether given string is empty (or null).static StringReturns the result of joining results of evaluating keychain on given list objects, separated by delimiter.static ListReturns a list of the given args.static ObjectReturns the maximum value of the two given values.static ObjectReturns the minimum value of the two given values.static NumberReturns a number for a given string.static StringReturns the given string padded by the given string to be the given length (category method).static StringReturns the given string padded by the given string to be the given length (category method).static StringReturns the given string padded by the given string to be the given length (category method).static DoubleReturns 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 ObjectRMAllFonts(Object aSize) Returns a string with all fonts names rendered as the fonts themselves (at the given size).static ObjectRMConditional(Object v, Object t) Returns the trueVal if condition is true, otherwise null.static ObjectRMConditional(Object v, Object t, Object f) static ObjectReturns an xstring by interpreting html commands in the given string.static RMXStringReturns an xstring with an embedded image shape for given image source.static ObjectReturns an xstring by interpreting rtf commands in the given string.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 StringFormats the given object in roman numerals.static StringFormats the given object in roman numerals.static longReturns the given value as a double rounded to the nearest integer.static ObjectReturns an xstring by interpreting rtf commands in the given string.static String[]Returns an array of strings by splitting given string with given regex separator.static booleanstartsWith(Object anObj, Object aString) Returns true if given object string starts with given string.static booleanstartsWith(String aString, Object pre) Returns whether given string starts with other given string (category method).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 StringReturns substring of given string from given start index (category method).static StringReturns substring of given string from given start index to given end index (category method).static StringWraps the given string to a max of given length by adding newlines.
-
Constructor Details
-
RMKeyChainFuncs
Creates a function call.
-
-
Method Details
-
getFunctionCall
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. -
invoke
Invoke method. -
addFunctionClass
Adds a class to the list of classes that RM queries for functions. -
isEmpty
Returns whether given string is empty (or null). -
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. -
RMHTML
Returns an xstring by interpreting html commands in the given string. -
RMRTF
Returns an xstring by interpreting rtf commands in the given string. -
RMImage
Returns an xstring with an embedded image shape for given image source. -
RMConditional
Returns the trueVal if condition is true, otherwise null. -
RMConditional
-
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. -
split
Returns an array of strings by splitting given string with given regex separator. -
join
Returns the result of joining results of evaluating keychain on given list objects, separated by delimiter. -
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. -
RMAllFonts
Returns a string with all fonts names rendered as the fonts themselves (at the given size). -
format
Returns string format of given date, using given date format string (category method). -
format
Returns string format of given number using given decimal format string (category method). -
format
Returns string format of given Double using given decimal format string (category method). -
format
Returns string format of given Float using given decimal format string (category method). -
format
Returns string format of given Integer using given decimal format string (category method). -
format
Returns string format of given BigDecimal using given decimal format string (category method). -
substring
Returns substring of given string from given start index (category method). -
substring
Returns substring of given string from given start index to given end index (category method). -
startsWith
Returns whether given string starts with other given string (category method). -
endsWith
Returns whether given string ends with other given string (category method). -
number
Returns a number for a given string. -
pad
Returns the given string padded by the given string to be the given length (category method). -
pad
Returns the given string padded by the given string to be the given length (category method). -
padLeft
Returns the given string padded by the given string to be the given length (category method). -
fix
Fixes the given string to the given length, padding by space. -
fix
Fixes the given string to the given length with the given pad string. -
wrap
Wraps the given string to a max of given length by adding newlines. -
list
Returns a list of the given args. -
roman
Formats the given object in roman numerals. If anObj is a date object, the year is formatted. -
roman
Formats the given object in roman numerals. If anObj is a date object, the year is formatted.
-