public class FunctionParser extends Object
Constructor and Description |
---|
FunctionParser() |
Modifier and Type | Method and Description |
---|---|
static org.epics.util.array.ListDouble |
asListDouble(List<Object> objects)
Convert the list of arguments to a ListDouble.
|
static List<String> |
asListString(List<Object> objects)
Convert the list of arguments to a List.
|
static Object |
asScalarOrList(List<Object> objects)
Converts the list of arguments into a scalar or
an appropriate list.
|
static List<Object> |
parseFunctionAnyParameter(String string)
Parses the string and returns the name of the function plus the
list of arguments.
|
static List<Object> |
parseFunctionAnyParameter(String nameRegex,
String string)
Parses the string and returns the name of the function plus the
list of arguments.
|
static List<Object> |
parseFunctionWithScalarOrArrayArguments(String string,
String errorMessage)
Parse a function that accepts a scalar value (number or string) or
an array value (number or string).
|
static List<Object> |
parseFunctionWithScalarOrArrayArguments(String nameRegex,
String string,
String errorMessage)
Parse a function that accepts a scalar value (number or string) or
an array value (number or string).
|
public static List<Object> parseFunctionWithScalarOrArrayArguments(String string, String errorMessage)
string
- the string to be parsederrorMessage
- the error messagepublic static List<Object> parseFunctionWithScalarOrArrayArguments(String nameRegex, String string, String errorMessage)
nameRegex
- regex for function namestring
- the string to be parsederrorMessage
- the error message for the exception if parsing failspublic static Object asScalarOrList(List<Object> objects)
objects
- the argument listpublic static org.epics.util.array.ListDouble asListDouble(List<Object> objects)
objects
- a list of argumentspublic static List<String> asListString(List<Object> objects)
objects
- a list of argumentspublic static List<Object> parseFunctionAnyParameter(String string)
string
- the string to be parsedpublic static List<Object> parseFunctionAnyParameter(String nameRegex, String string)
nameRegex
- the syntax for the function namestring
- the string to be parsedCopyright © 2010–2015. All rights reserved.