CHORE: make TomlObject's #toString more readable

This commit is contained in:
BradBot_1 2023-06-30 03:40:18 +01:00
parent 8e1b0dfc70
commit 353c75f0a6

View file

@ -103,7 +103,7 @@ public final class TomlObject implements ITomlElement, Iterable<String> {
public final @NotNull String toString() {
@NotNull final StringBuilder asString = new StringBuilder("TomlObject{elementMap=");
for (@NotNull final Entry<String, ITomlElement> entry : this.elementMap.entrySet()) {
asString.append(entry.getKey()).append(',').append(entry.getValue().toString()).append(',');
asString.append('[').append(entry.getKey()).append(':').append(entry.getValue().toString()).append("],");
}
final String compiled = asString.toString();
return compiled.substring(0, compiled.length() - 1) + '}';