public class Constant extends Expression
| Constructor and Description |
|---|
Constant(Element constant,
FieldMetaInfo.Optype opType,
ArrayList<Attribute> fieldDefs)
Construct an new Constant Expression.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getResult(double[] incoming)
Get the result of evaluating the expression.
|
String |
getResultCategorical(double[] incoming)
Gets the result of evaluating the expression when the
optype is categorical or ordinal as the actual String
value.
|
static void |
main(String[] args) |
String |
toString(String pad) |
getExpression, getExpression, getFieldDef, getFieldDefIndex, getOptype, getResultContinuous, setFieldDefs, toStringpublic Constant(Element constant, FieldMetaInfo.Optype opType, ArrayList<Attribute> fieldDefs) throws Exception
constant - the xml Element containing the ConstantopType - the optype for the ConstantfieldDefs - an ArrayList of Attributes for the fields that this
Expression might need to access (not needed for a constant!)Exception - if the optype is specified as continuous
and there is a problem parsing the value of the Constantpublic double getResult(double[] incoming)
getResult in class Expressionincoming - the incoming parameter valuespublic String getResultCategorical(double[] incoming) throws Exception
getResultCategorical in class Expressionincoming - the incoming parameter valuesException - if the optype is continuouspublic static void main(String[] args)
public String toString(String pad)
toString in class ExpressionCopyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.