Package org.ssclab.pl.milp
Class JsonProblem
- java.lang.Object
-
- org.ssclab.pl.milp.JsonProblem
-
public class JsonProblem extends Object
The JsonProblem class represents a problem in JSON format that can be loaded either from a file or a string. It provides functionality to retrieve a BufferedReader to access the problem's content.
-
-
Constructor Summary
Constructors Constructor Description JsonProblem(String json)
Constructs a JsonProblem from a JSON string.JsonProblem(Path path)
Constructs a JsonProblem from a file path.
-
-
-
Constructor Detail
-
JsonProblem
public JsonProblem(Path path)
Constructs a JsonProblem from a file path. The problem will be loaded from the specified file.- Parameters:
path
- the path to the JSON file containing the problem
-
JsonProblem
public JsonProblem(String json)
Constructs a JsonProblem from a JSON string. The problem will be represented by the provided JSON content.- Parameters:
json
- the JSON string representing the problem
-
-