public void add(Collection<RuleGrounding> alternatives){
  boolean foundSuccess=false;
  for (  RuleGrounding g : alternatives) {
    if (!g.isFailed()) {
      add(g);
      foundSuccess=true;
    }
  }
  if (!foundSuccess) {
    groundings.clear();
  }
}

public void add ( Collection < RuleGrounding > alternatives ) { boolean foundSuccess = false ; for ( RuleGrounding g : alternatives ) { if ( ! g . isFailed ( ) ) { add ( g ) ; foundSuccess = true ; } } if ( ! foundSuccess ) { groundings . clear ( ) ; } }
adds a collection of alternative groundings . at least one must be non - failed .
