public boolean addDef ( String sec , String key , String value ) { Assertion ast = new Assertion ( ) ; ast . key = key ; ast . value = value ; if ( ast . value . equals ( "" ) ) { return false ; } if ( sec . equals ( "r" ) || sec . equals ( "p" ) ) { ast . tokens = ast . value . split ( ", " ) ; for ( int i = 0 ; i < ast . tokens . length ; i ++ ) { ast . tokens [ i ] = key + "_" + ast . tokens [ i ] ; } } else { ast . value = Util . removeComments ( Util . escapeAssertion ( ast . value ) ) ; } if ( ! model . containsKey ( sec ) ) { model . put ( sec , new HashMap <> ( ) ) ; } model . get ( sec ) . put ( key , ast ) ; return true ; }
addDef adds an assertion to the model .