public boolean add ( ModuleDepInfo other ) { Boolean modified = false ; if ( formula . isTrue ( ) ) { // No terms added to a true formula will change the evaluation. return false ; } if ( other . formula . isTrue ( ) ) { // Adding true to this formula makes this formula true. modified = ! formula . isTrue ( ) ; formula = new BooleanFormula ( true ) ; if ( modified && other . comment != null && other . commentTermSize < commentTermSize ) { comment = other . comment ; commentTermSize = other . commentTermSize ; } return modified ; } // Add the terms modified = formula . addAll ( other . formula ) ; // Copy over plugin name if needed if ( ! isPluginNameDeclared && other . isPluginNameDeclared ) { pluginName = other . pluginName ; isPluginNameDeclared = true ; modified = true ; } // And comments... if ( other . comment != null && other . commentTermSize < commentTermSize ) { comment = other . comment ; commentTermSize = other . commentTermSize ; } return modified ; }
Adds the terms and comments from the specified object to this object .