Here you can find the source of toString(Map varnames_to_Terms)
Parameter | Description |
---|---|
varnames_to_Terms | A Map from variable names to Terms. |
public static String toString(Map varnames_to_Terms)
//package com.java2s; // modify it under the terms of the GNU Library Public License import java.util.Map; public class Main { /**//from ww w . ja v a 2s. co m * Converts a substitution, in the form of a Map from variable names to Terms, to a String. * * @param varnames_to_Terms A Map from variable names to Terms. * @return String A String representation of the variable bindings */ public static String toString(Map varnames_to_Terms) { if (varnames_to_Terms == null) { return "[no solution]"; } java.util.Iterator varnames = varnames_to_Terms.keySet().iterator(); String s = "Bindings: "; while (varnames.hasNext()) { String varname = (String) varnames.next(); s += varname + "=" + varnames_to_Terms.get(varname).toString() + "; "; } return s; } }