public class Constant extends Expression
| Constructor and Description |
|---|
Constant(org.w3c.dom.Element constant,
FieldMetaInfo.Optype opType,
java.util.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.
|
java.lang.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(java.lang.String[] args) |
java.lang.String |
toString(java.lang.String pad) |
getExpression, getExpression, getFieldDef, getFieldDefIndex, getOptype, getResultContinuous, setFieldDefs, toStringpublic Constant(org.w3c.dom.Element constant,
FieldMetaInfo.Optype opType,
java.util.ArrayList<Attribute> fieldDefs)
throws java.lang.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!)java.lang.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 java.lang.String getResultCategorical(double[] incoming)
throws java.lang.Exception
getResultCategorical in class Expressionincoming - the incoming parameter valuesjava.lang.Exception - if the optype is continuouspublic static void main(java.lang.String[] args)
public java.lang.String toString(java.lang.String pad)
toString in class Expression