a Prolog source text representation of this dictionary's value @return a Prolog source text representation of this dictionary's value
()
| 152 | * @return a Prolog source text representation of this dictionary's value |
| 153 | */ |
| 154 | @Override |
| 155 | public String toString() { |
| 156 | String mapping = ""; |
| 157 | |
| 158 | for (Iterator<Atom> iterator = map.keySet().iterator(); iterator.hasNext();) { |
| 159 | Atom key= iterator.next(); |
| 160 | Term value = map.get(key); |
| 161 | mapping = mapping + String.format("%s:%s", key.toString(), value.toString()) ; |
| 162 | if (iterator.hasNext()) mapping = mapping + ", "; |
| 163 | } |
| 164 | return String.format("%s{%s}", tag, mapping); |
| 165 | } |
| 166 | |
| 167 | //TODO: exchange for this when upgrading to Java 1.8 |
| 168 | // public String toString() { |