private static List<MatchResult> flattenResults(List<List<MatchResult>> allResults){
  List<MatchResult> results=new ArrayList<MatchResult>();
  results.addAll(allResults.remove(0));
  for (  List<MatchResult> relResults : allResults) {
    List<MatchResult> newResults=new ArrayList<MatchResult>();
    for (    MatchResult curResult : results) {
      for (      MatchResult relResult : relResults) {
        MatchResult newResult=curResult.copy();
        newResult.addAssignment(relResult);
        newResults.add(newResult);
      }
    }
    results=newResults;
  }
  return results;
}

private static List < MatchResult > flattenResults ( List < List < MatchResult > > allResults ) { List < MatchResult > results = new ArrayList < MatchResult > ( ) ; results . addAll ( allResults . remove ( 0 ) ) ; for ( List < MatchResult > relResults : allResults ) { List < MatchResult > newResults = new ArrayList < MatchResult > ( ) ; for ( MatchResult curResult : results ) { for ( MatchResult relResult : relResults ) { MatchResult newResult = curResult . copy ( ) ; newResult . addAssignment ( relResult ) ; newResults . add ( newResult ) ; } } results = newResults ; } return results ; }
creates the combination of all match results .
