Package com.bayesserver
Class FunctionVariableExpression
- java.lang.Object
-
- com.bayesserver.FunctionVariableExpression
-
- All Implemented Interfaces:
Expression,QueryExpression,Cloneable
public final class FunctionVariableExpression extends Object implements QueryExpression, Cloneable
An expression that can be used in a function node/variable.
-
-
Constructor Summary
Constructors Constructor Description FunctionVariableExpression(String text, ExpressionReturnType returnType)Creates a new function node expression.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Expressioncopy()Creates a copy of the expression.VariablegetOwner()Gets the current owner, if assigned to a variable.ExpressionReturnTypegetReturnType()Gets the return type of the expression.StringgetText()Gets the expression text.voidsetReturnType(ExpressionReturnType value)voidsetText(String value)Sets the expression text.static voidvalidateSyntax(String expr)Validates the syntax of a function expression.
-
-
-
Constructor Detail
-
FunctionVariableExpression
public FunctionVariableExpression(String text, ExpressionReturnType returnType)
Creates a new function node expression.- Parameters:
text- The expression text.returnType- The return type of the expression.
-
-
Method Detail
-
copy
public Expression copy()
Creates a copy of the expression. The new expression will not have an owner.- Specified by:
copyin interfaceExpression- Returns:
- A copy of the expression.
-
validateSyntax
public static void validateSyntax(String expr)
Validates the syntax of a function expression. This method only checks the syntax, and does not ensure the expression will evaluate without errors.- Parameters:
expr- The expression string to test.
-
getText
public String getText()
Gets the expression text.- Specified by:
getTextin interfaceExpression
-
setText
public void setText(String value)
Sets the expression text.- Specified by:
setTextin interfaceExpression
-
getOwner
public Variable getOwner()
Gets the current owner, if assigned to a variable. An expression cannot be modified when it is assigned to a variable.- Specified by:
getOwnerin interfaceQueryExpression
-
getReturnType
public ExpressionReturnType getReturnType()
Gets the return type of the expression.- Specified by:
getReturnTypein interfaceExpression
-
setReturnType
public void setReturnType(ExpressionReturnType value)
-
-