org.drools.decisiontable.model
Class Rule
java.lang.Object
org.drools.decisiontable.model.DRLElement
org.drools.decisiontable.model.Rule
- All Implemented Interfaces:
- DRLJavaEmitter
public class Rule
- extends DRLElement
- implements DRLJavaEmitter
-

Constructor Summary |
Rule(java.lang.String name,
java.lang.Integer salience)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Rule
public Rule(java.lang.String name,
java.lang.Integer salience)
addParameter
public void addParameter(Parameter param)
setParameters
public void setParameters(java.util.List parameterList)
addCondition
public void addCondition(Condition con)
addConsequence
public void addConsequence(Consequence con)
toXML
public java.lang.String toXML()
- Specified by:
toXML
in interface DRLJavaEmitter
- Returns:
- an XML snippet (well formed) for the current object. This should
NOT be a complete XML document, just well formed.
calcSalience
public static int calcSalience(int rowNumber)
convertColNumToColName
public static java.lang.String convertColNumToColName(int i)
- Parameters:
col
- -
the column number. Start with zero.
- Returns:
- The spreadsheet name for this col number, such as "AA" or "AB" or
"A" and such and such.
getConditions
public java.util.List getConditions()
getConsequences
public java.util.List getConsequences()
getParameters
public java.util.List getParameters()
setSalience
public void setSalience(java.lang.Integer value)
getSalience
public java.lang.Integer getSalience()
setName
public void setName(java.lang.String value)
getName
public java.lang.String getName()
setDuration
public void setDuration(Duration value)