public static void addNewActionType ( final Map < Integer , ActionType > actionTypeMap , final String value , final int column , final int row ) { final String ucValue = value . toUpperCase ( ) ; Code code = tag2code . get ( ucValue ) ; if ( code == null ) { code = tag2code . get ( ucValue . substring ( 0 , 1 ) ) ; } if ( code != null ) { int count = 0 ; for ( ActionType at : actionTypeMap . values ( ) ) { if ( at . getCode ( ) == code ) { count ++ ; } } if ( count >= code . getMaxCount ( ) ) { throw new DecisionTableParseException ( "Maximum number of " + code . getColHeader ( ) + "/" + code . getColShort ( ) + " columns is " + code . getMaxCount ( ) + ", in cell " + RuleSheetParserUtil . rc2name ( row , column ) ) ; } actionTypeMap . put ( new Integer ( column ) , new ActionType ( code ) ) ; } else { throw new DecisionTableParseException ( "Invalid column header: " + value + ", should be CONDITION, ACTION or attribute, " + "in cell " + RuleSheetParserUtil . rc2name ( row , column ) ) ; } }
Create a new action type that matches this cell and add it to the map keyed on that column .