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 double
Returns the absolute value of the given value.static void
addFunctionClass
(Class aClass) Adds a class to the list of classes that RM queries for functions.static long
Returns the given value as a double rounded up to the nest largest integer.static boolean
Returns true if given object string ends with given string.static boolean
Returns whether given string ends with other given string (category method).static String
Fixes the given string to the given length, padding by space.static String
Fixes the given string to the given length with the given pad string.static long
Returns the given value as a double truncated down to the nest smallest integer.static String
Returns string format of given Double using given decimal format string (category method).static String
Returns string format of given Float using given decimal format string (category method).static String
Returns string format of given Integer using given decimal format string (category method).static String
Returns string format of given number using given decimal format string (category method).static String
format
(BigDecimal aDecimal, Object aFormatString) Returns string format of given BigDecimal using given decimal format string (category method).static String
Returns string format of given date, using given date format string (category method).static RMKeyChainFuncs
getFunctionCall
(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 Object
Returns an xstring by interpreting html commands in the given string.Invoke method.boolean
Returns whether given string is empty (or null).static String
Returns the result of joining results of evaluating keychain on given list objects, separated by delimiter.static List
Returns a list of the given args.static Object
Returns the maximum value of the two given values.static Object
Returns the minimum value of the two given values.static Number
Returns a number for a given string.static String
Returns the given string padded by the given string to be the given length (category method).static String
Returns the given string padded by the given string to be the given length (category method).static String
Returns the given string padded by the given string to be the given length (category method).static Double
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
RMAllFonts
(Object aSize) Returns a string with all fonts names rendered as the fonts themselves (at the given size).static Object
RMConditional
(Object v, Object t) Returns the trueVal if condition is true, otherwise null.static Object
RMConditional
(Object v, Object t, Object f) static Object
Returns an xstring by interpreting html commands in the given string.static RMXString
Returns an xstring with an embedded image shape for given image source.static Object
Returns an xstring by interpreting rtf commands in the given string.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 String
Formats the given object in roman numerals.static String
Formats the given object in roman numerals.static long
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 String[]
Returns an array of strings by splitting given string with given regex separator.static boolean
startsWith
(Object anObj, Object aString) Returns true if given object string starts with given string.static boolean
startsWith
(String aString, Object pre) Returns whether given string starts with other given string (category method).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 String
Returns substring of given string from given start index (category method).static String
Returns substring of given string from given start index to given end index (category method).static String
Wraps 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.
-