public void extend(Collection<Assignment> alternatives){
  if (alternatives.isEmpty()) {
    return;
  }
  Set<Assignment> newGroundings=new HashSet<Assignment>();
  for (  Assignment o : alternatives) {
    for (    Assignment g : groundings) {
      newGroundings.add(new Assignment(o,g));
      newGroundings.add(new Assignment(g,o));
    }
  }
  groundings=newGroundings;
}

public void extend ( Collection < Assignment > alternatives ) { if ( alternatives . isEmpty ( ) ) { return ; } Set < Assignment > newGroundings = new HashSet < Assignment > ( ) ; for ( Assignment o : alternatives ) { for ( Assignment g : groundings ) { newGroundings . add ( new Assignment ( o , g ) ) ; newGroundings . add ( new Assignment ( g , o ) ) ; } } groundings = newGroundings ; }
extends the existing groundings with the alternative groundings
