Package org.drools.decisiontable.parser
Class LhsBuilder
- java.lang.Object
-
- org.drools.decisiontable.parser.LhsBuilder
-
- All Implemented Interfaces:
SourceBuilder
public class LhsBuilder extends Object implements SourceBuilder
This utility will build up a list of constraints for a column. For instance, the column has been spanned across multiple cells, and the cells below contain the constraints.
-
-
Constructor Summary
Constructors Constructor Description LhsBuilder(int row, int column, String colDefinition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCellValue(int row, int column, String value)voidaddCellValue(int row, int column, String value, boolean trim)voidaddTemplate(int row, int column, String content)org.drools.decisiontable.parser.LhsBuilder.FieldTypecalcFieldType(String content)Work out the type of "field" that is being specified, as in : age age < age == $param age == $1 || age == $2 forall{age < $}{,}voidclearValues()ActionType.CodegetActionTypeCode()intgetColumn()StringgetResult()booleanhasValues()
-
-
-
Constructor Detail
-
LhsBuilder
public LhsBuilder(int row, int column, String colDefinition)- Parameters:
colDefinition- The initial column definition that is shared via merged cells.
-
-
Method Detail
-
getActionTypeCode
public ActionType.Code getActionTypeCode()
- Specified by:
getActionTypeCodein interfaceSourceBuilder
-
addTemplate
public void addTemplate(int row, int column, String content)- Specified by:
addTemplatein interfaceSourceBuilder
-
clearValues
public void clearValues()
- Specified by:
clearValuesin interfaceSourceBuilder
-
addCellValue
public void addCellValue(int row, int column, String value)- Specified by:
addCellValuein interfaceSourceBuilder
-
addCellValue
public void addCellValue(int row, int column, String value, boolean trim)- Specified by:
addCellValuein interfaceSourceBuilder
-
getResult
public String getResult()
- Specified by:
getResultin interfaceSourceBuilder
-
calcFieldType
public org.drools.decisiontable.parser.LhsBuilder.FieldType calcFieldType(String content)
Work out the type of "field" that is being specified, as in : age age < age == $param age == $1 || age == $2 forall{age < $}{,} etc. as we treat them all differently.
-
hasValues
public boolean hasValues()
- Specified by:
hasValuesin interfaceSourceBuilder
-
getColumn
public int getColumn()
- Specified by:
getColumnin interfaceSourceBuilder
-
-