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 newTableExpression
instance with double return type.TableExpression(String text, ExpressionReturnType returnType)
Constructs a newTableExpression
instance.TableExpression(String text, ExpressionReturnType returnType, TableExpressionNormalization normalization)
Constructs a newTableExpression
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Expression
copy()
Creates a copy of the expression.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.Node
getOwner()
Gets the current owner, if assigned to a node.ExpressionReturnType
getReturnType()
Gets the return type of the expression.String
getText()
Gets the expression text, which is run for each cell in the table.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.void
setReturnType(ExpressionReturnType value)
void
setText(String value)
Sets the expression text, which is run for each cell in the table.
-
-
-
Constructor Detail
-
TableExpression
public TableExpression(String text)
Constructs a newTableExpression
instance with double return type.- Parameters:
text
- The expression text.
-
TableExpression
public TableExpression(String text, ExpressionReturnType returnType)
Constructs a newTableExpression
instance.- Parameters:
text
- The expression text.returnType
- The return type of the expression.
-
TableExpression
public TableExpression(String text, ExpressionReturnType returnType, TableExpressionNormalization normalization)
Constructs a newTableExpression
instance.- 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:
copy
in 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:
getText
in interfaceExpression
-
setText
public void setText(String value)
Sets the expression text, which is run for each cell in the table.- Specified by:
setText
in 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:
getOwner
in interfaceDistributionExpression
-
getReturnType
public ExpressionReturnType getReturnType()
Gets the return type of the expression.- Specified by:
getReturnType
in interfaceExpression
-
setReturnType
public void setReturnType(ExpressionReturnType value)
-
-