|
|
@ -95,12 +95,16 @@ public class Facts implements Iterable<Map.Entry<String, Object>> {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
public String toString() {
|
|
|
|
StringBuilder stringBuilder = new StringBuilder("Facts {").append("\n");
|
|
|
|
StringBuilder stringBuilder = new StringBuilder("[");
|
|
|
|
for (Map.Entry<String, Object> fact : facts.entrySet()) {
|
|
|
|
List<Map.Entry<String, Object>> entries = new ArrayList<>(facts.entrySet());
|
|
|
|
stringBuilder.append(format(" Fact { %s : %s }", fact.getKey(), String.valueOf(fact.getValue())));
|
|
|
|
for (int i = 0; i < entries.size(); i++) {
|
|
|
|
stringBuilder.append("\n");
|
|
|
|
Map.Entry<String, Object> entry = entries.get(i);
|
|
|
|
|
|
|
|
stringBuilder.append(format(" { %s : %s } ", entry.getKey(), String.valueOf(entry.getValue())));
|
|
|
|
|
|
|
|
if (i < entries.size() - 1) {
|
|
|
|
|
|
|
|
stringBuilder.append(",");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stringBuilder.append("}");
|
|
|
|
stringBuilder.append("]");
|
|
|
|
return stringBuilder.toString();
|
|
|
|
return stringBuilder.toString();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|