Class LhsBuilder

  • All Implemented Interfaces:
    SourceBuilder

    public class LhsBuilder
    extends java.lang.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, java.lang.String colDefinition)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addCellValue​(int row, int column, java.lang.String value)  
      void addCellValue​(int row, int column, java.lang.String value, boolean trim)  
      void addTemplate​(int row, int column, java.lang.String content)  
      org.drools.decisiontable.parser.LhsBuilder.FieldType calcFieldType​(java.lang.String content)
      Work out the type of "field" that is being specified, as in : age age < age == $param age == $1 || age == $2 forall{age < $}{,}
      void clearValues()  
      ActionType.Code getActionTypeCode()  
      int getColumn()  
      java.lang.String getResult()  
      boolean hasValues()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LhsBuilder

        public LhsBuilder​(int row,
                          int column,
                          java.lang.String colDefinition)
        Parameters:
        colDefinition - The initial column definition that is shared via merged cells.
    • Method Detail

      • addTemplate

        public void addTemplate​(int row,
                                int column,
                                java.lang.String content)
        Specified by:
        addTemplate in interface SourceBuilder
      • addCellValue

        public void addCellValue​(int row,
                                 int column,
                                 java.lang.String value)
        Specified by:
        addCellValue in interface SourceBuilder
      • addCellValue

        public void addCellValue​(int row,
                                 int column,
                                 java.lang.String value,
                                 boolean trim)
        Specified by:
        addCellValue in interface SourceBuilder
      • calcFieldType

        public org.drools.decisiontable.parser.LhsBuilder.FieldType calcFieldType​(java.lang.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.