[grid] TomlConfig returns sorted config details
import java.util.List;
import java.util.Optional;
import java.util.Set;
+import java.util.stream.Collectors;
public class TomlConfig implements Config {
@@ -94,6 +95,8 @@ public static Config from(Path path) {
.map(item -> (TomlTable)item)
.forEach(tomlTable -> tomlTable.toMap().entrySet().stream()
.map(entry -> String.format("%s=%s", entry.getKey(), entry.getValue()))
+ .collect(Collectors.toList())
+ .stream().sorted()
.forEach(toReturn::add));
return Optional.of(toReturn);
}
