Package com.bayesserver
Class TableExpression
- java.lang.Object
-
- com.bayesserver.TableExpression
-
- All Implemented Interfaces:
DistributionExpression,Expression,Cloneable
public final class TableExpression extends Object implements DistributionExpression, Cloneable
Represents an expression that is used to generate Table distributions.
-
-
Constructor Summary
Constructors Constructor Description TableExpression(String text)Constructs a newTableExpressioninstance with double return type.TableExpression(String text, ExpressionReturnType returnType)Constructs a newTableExpressioninstance.TableExpression(String text, ExpressionReturnType returnType, TableExpressionNormalization normalization)Constructs a newTableExpressioninstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Expressioncopy()Creates a copy of the expression.TableExpressionNormalizationgetNormalization()Gets of sets the normalization method, if any, to use once the Table values have been generated, but before assignment to a node.NodegetOwner()Gets the current owner, if assigned to a node.ExpressionReturnTypegetReturnType()Gets the return type of the expression.StringgetText()Gets the expression text, which is run for each cell in the table.voidsetNormalization(TableExpressionNormalization value)Gets of sets the normalization method, if any, to use once the Table values have been generated, but before assignment to a node.voidsetReturnType(ExpressionReturnType value)voidsetText(String value)Sets the expression text, which is run for each cell in the table.
-
-
-
Constructor Detail
-
TableExpression
public TableExpression(String text)
Constructs a newTableExpressioninstance with double return type.- Parameters:
text- The expression text.
-
TableExpression
public TableExpression(String text, ExpressionReturnType returnType)
Constructs a newTableExpressioninstance.- Parameters:
text- The expression text.returnType- The return type of the expression.
-
TableExpression
public TableExpression(String text, ExpressionReturnType returnType, TableExpressionNormalization normalization)
Constructs a newTableExpressioninstance.- Parameters:
text- The expression text.returnType- The return type of the expression.normalization- The normalization, if any, to apply once the table has been filled, but before assignment.
-
-
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.
-
getText
public String getText()
Gets the expression text, which is run for each cell in the table.- Specified by:
getTextin interfaceExpression
-
setText
public void setText(String value)
Sets the expression text, which is run for each cell in the table.- Specified by:
setTextin interfaceExpression
-
getNormalization
public TableExpressionNormalization getNormalization()
Gets of sets the normalization method, if any, to use once the Table values have been generated, but before assignment to a node.
-
setNormalization
public void setNormalization(TableExpressionNormalization value)
Gets of sets the normalization method, if any, to use once the Table values have been generated, but before assignment to a node.
-
getOwner
public Node getOwner()
Gets the current owner, if assigned to a node. An expression cannot be modified when it is assigned to a node.- Specified by:
getOwnerin interfaceDistributionExpression
-
getReturnType
public ExpressionReturnType getReturnType()
Gets the return type of the expression.- Specified by:
getReturnTypein interfaceExpression
-
setReturnType
public void setReturnType(ExpressionReturnType value)
-
-