lojix/logic/src/main/com/thesett/aima/logic/fol/interpreter/ResolutionEngine.java
public Iterable<Map<String, Variable>> expandResultSetToMap(Iterator<Set<Variable>> solutions)
    {
        return new Filterator<Set<Variable>, Map<String, Variable>>(solutions,
            new Function<Set<Variable>, Map<String, Variable>>()
            {
                public Map<String, Variable> apply(Set<Variable> variables)
                {
                    Map<String, Variable> results = new HashMap<String, Variable>();

                    for (Variable var : variables)
                    {
                        String varName = getInterner().getVariableName(var.getName());
                        results.put(varName, var);
                    }

                    return results;
                }
            });
    }
public Iterable<Map<String, Variable>> expandResultSetToMap(Iterator<Set<Variable>> solutions)
    {
        return new Filterator<Set<Variable>, Map<String, Variable>>(solutions,
            new Function<Set<Variable>, Map<String, Variable>>()
            {
                public Map<String, Variable> apply(Set<Variable> variables)
                {
                    Map<String, Variable> results = new HashMap<String, Variable>();

                    for (Variable var : variables)
                    {
                        String varName = getInterner().getVariableName(var.getName());
                        results.put(varName, var);
                    }

                    return results;
                }
            });
    }
public Iterable < Map < String , Variable > > expandResultSetToMap ( Iterator < Set < Variable > > solutions ) { return new Filterator < Set < Variable > , Map < String , Variable > > ( solutions , new Function < Set < Variable > , Map < String , Variable > > ( ) { public Map < String , Variable > apply ( Set < Variable > variables ) { Map < String , Variable > results = new HashMap < String , Variable > ( ) ; for ( Variable var : variables ) { String varName = getInterner ( ) . getVariableName ( var . getName ( ) ) ; results . put ( varName , var ) ; } return results ; } } ) ; }
Transforms an iterator over sets of variable bindings, resulting from a query, to an iterator over a map from the
string name of variables to their bindings, for the same sequence of query solutions.

@param  solutions The resolution solutions to convert to map form.

@return An iterator over a map from the string name of variables to their bindings, for the solutions.
Transforms an iterator over sets of variable bindings resulting from a query to an iterator over a map from the string name of variables to their bindings for the same sequence of query solutions .